mirror of
https://github.com/zhigang1992/MagicalRecord.git
synced 2026-01-12 22:48:38 +08:00
33 lines
1003 B
Objective-C
33 lines
1003 B
Objective-C
//
|
|
// Import SingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKeyTests.m
|
|
// Magical Record
|
|
//
|
|
// Created by Saul Mora on 8/16/11.
|
|
// Copyright 2011 Magical Panda Software LLC. All rights reserved.
|
|
//
|
|
|
|
#import "SingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKey.h"
|
|
#import "MagicalDataImportTestCase.h"
|
|
|
|
@interface ImportSingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKeyTests : MagicalDataImportTestCase
|
|
|
|
@end
|
|
|
|
@implementation ImportSingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKeyTests
|
|
|
|
- (Class) testEntityClass
|
|
{
|
|
return [SingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKey class];
|
|
}
|
|
|
|
- (void) testImportData
|
|
{
|
|
SingleEntityRelatedToManyMappedEntitiesUsingMappedPrimaryKey *entity = [[self testEntityClass] MR_importFromObject:self.testEntityData];
|
|
[[NSManagedObjectContext MR_defaultContext] MR_saveToPersistentStoreAndWait];
|
|
|
|
assertThat(entity, is(notNilValue()));
|
|
assertThat(entity.mappedEntities, hasCountOf(4));
|
|
}
|
|
|
|
@end
|