mirror of
https://github.com/zhigang1992/MagicalRecord.git
synced 2026-01-12 22:48:38 +08:00
33 lines
1.0 KiB
Objective-C
33 lines
1.0 KiB
Objective-C
//
|
|
// ImportSingleEntityRelatedToMappedEntityWithSecondaryMappingsTests.m
|
|
// Magical Record
|
|
//
|
|
// Created by Saul Mora on 8/18/11.
|
|
// Copyright (c) 2011 Magical Panda Software LLC. All rights reserved.
|
|
//
|
|
#import "MagicalDataImportTestCase.h"
|
|
#import "SingleEntityRelatedToMappedEntityWithSecondaryMappings.h"
|
|
#import "MappedEntity.h"
|
|
|
|
@interface ImportSingleEntityRelatedToMappedEntityWithSecondaryMappingsTests : MagicalDataImportTestCase
|
|
|
|
@end
|
|
|
|
@implementation ImportSingleEntityRelatedToMappedEntityWithSecondaryMappingsTests
|
|
|
|
- (Class) testEntityClass
|
|
{
|
|
return [SingleEntityRelatedToMappedEntityWithSecondaryMappings class];
|
|
}
|
|
|
|
- (void) testImportMappedAttributeUsingSecondaryMappedKeyName
|
|
{
|
|
SingleEntityRelatedToMappedEntityWithSecondaryMappings *entity = [[self testEntityClass] MR_importFromObject:self.testEntityData];
|
|
[[NSManagedObjectContext MR_defaultContext] MR_saveToPersistentStoreAndWait];
|
|
|
|
assertThat(entity, is(notNilValue()));
|
|
assertThat([entity secondaryMappedAttribute], containsString(@"sample json file"));
|
|
}
|
|
|
|
@end
|