Commits

Tuukka Norri committed f6f445b

Trying to solve the problem with the test
- Turned query loggin on.
- Added some checks for object existence.

  • Participants
  • Parent commits 1c4978f

Comments (0)

Files changed (1)

File UnitTests/Sources/EntityTests.m

 
 - (void) testExclusion
 {
+	[ctx setLogsQueries: YES];
 	[ctx connectSync: NULL];
+	[ctx setLogsQueries: YES];
 	
-	BXEntityDescription* entity = [ctx entityForTable: @"test" error: NULL];
-	MKCAssertNotNil (entity);
+	NSError* error = nil;
+	BXEntityDescription* entity = [ctx entityForTable: @"test" error: &error];
+	STAssertNotNil (entity, [error description]);
 	
 	BXAttributeDescription* attr = [[entity attributesByName] objectForKey: @"xmin"];
+	MKCAssertNotNil (attr);
 	MKCAssertTrue ([attr isExcluded]);
 	attr = [[entity attributesByName] objectForKey: @"id"];
+	MKCAssertNotNil (attr);
 	MKCAssertFalse ([attr isExcluded]);
 	attr = [[entity attributesByName] objectForKey: @"value"];
+	MKCAssertNotNil (attr);
 	MKCAssertFalse ([attr isExcluded]);
 }