Browse files

test uuid is not nil + 36 chars long

(including '-' chars)
  • Loading branch information...
1 parent b0ae80d commit 411f0c3fbe5486eb0eef83e092ce2bf33c7c9fc7 @derrickj committed Jan 14, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 MobilityTests/MobilityLoggerTests.m
View
2 MobilityTests/MobilityLoggerTests.m
@@ -21,6 +21,7 @@ - (void)tearDown {
- (void)testUUIDGeneration {
STAssertNotNil([MobilityLogger generateRandomUUID], @"UUID should NOT be nil");
+ STAssertEquals([[MobilityLogger generateRandomUUID] length], (NSUInteger)36, @"UUID should be 36 characters long");
}
- (void)testJSONRepresentationForDataPoints {
@@ -42,6 +43,7 @@ - (void)testJSONRepresentationForDataPoints {
id location = [[object objectAtIndex:0] valueForKey:@"location"];
STAssertEquals([[location valueForKey:@"longitude"] doubleValue], [p.longitude doubleValue], @"location's longitude should be the same");
STAssertEquals([[location valueForKey:@"latitude"] doubleValue], [p.latitude doubleValue], @"latitudes should be the same");
+ STAssertNotNil([object valueForKey:@"id"], @"object's id should not be Nil");
}

0 comments on commit 411f0c3

Please sign in to comment.