forked from tomaz/appledoc
/
GBIvarDataTesting.m
34 lines (28 loc) · 1.07 KB
/
GBIvarDataTesting.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// GBIvarDataTesting.m
// appledoc
//
// Created by Tomaz Kragelj on 28.7.10.
// Copyright (C) 2010 Gentle Bytes. All rights reserved.
//
#import "GBIvarData.h"
@interface GBIvarDataTesting : GHTestCase
@end
@implementation GBIvarDataTesting
- (void)testMergeDataFromObject_shouldMergeImplementationDetails {
// setup - ivars don't merge any data, except they need to send base class merging message!
GBIvarData *original = [GBTestObjectsRegistry ivarWithComponents:@"int", @"_name", nil];
GBIvarData *source = [GBTestObjectsRegistry ivarWithComponents:@"int", @"_name", nil];
[source registerSourceInfo:[GBSourceInfo infoWithFilename:@"file" lineNumber:1]];
// execute
[original mergeDataFromObject:source];
// verify - simple testing here, fully tested in GBModelBaseTesting!
assertThatInteger([original.sourceInfos count], equalToInteger(1));
}
- (void)testIsTopLevelObject_shouldReturnNO {
// setup & execute
GBIvarData *ivar = [GBTestObjectsRegistry ivarWithComponents:@"int", @"_name", nil];
// verify
assertThatBool(ivar.isTopLevelObject, equalToBool(NO));
}
@end