SenTestingKit / SenTestCase not working on iPhone
SenTestingKit / SenTestCase not working on iPhone
- Subject: SenTestingKit / SenTestCase not working on iPhone
- From: "Michael A. Crawford" <email@hidden>
- Date: Sun, 29 Nov 2009 20:17:37 -0500
I'm trying to test a parser I created for a web service using OCUnit/SenTestingKit. (They're the same thing, right?) I've defined the test class, which I've abbreviated below. On my first attempt the build failed because the SenTestingKit framework had not been added to the project. I tried to add it but it wasn't in the default list of available project frameworks. I had to hunt it down on the drive. I found it at the following location: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/Developer/Library/Frameworks/SenTestingKit.framework.
Once I added it to the project the project builds but the tests do not run. What have I missed? Anyone out there currently using this test framework? I haven't used it since the 2.X SDK and back then it worked just fine.
#import <Foundation/Foundation.h>
#import <SenTestingKit/SenTestingKit.h>
#import "MPData.h"
@interface MPDataTest : SenTestCase
{
MPData* mpData;
}
@end
@implementation MPDataTest
- (void)setUp
{
static NSString * const kXMLTestString = @"<?xml version=\"1.0\"?><Response><time>12:32 PM</time><date>November 24, 2009</date><Error>NO_ERROR</Error></Response>";
NSData* data = [kXMLTestString dataUsingEncoding:NSUTF8StringEncoding];
mpData = [[MPDataTest alloc] initWithData:data];
}
- (void)tearDown
{
[mpData release];
}
- (void)testCreateMPData
{
STAssertNotNil(mpData, @"Alloc and initWithData for MPData instance failed");
STAssertTrue(mpData.isValid, @"MPData failed validation");
}
- (void)testFail
{
STFail(@"Yep, it works!");
}
@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden