Skip to content

Commit

Permalink
TestObject -> MSTestObject
Browse files Browse the repository at this point in the history
  • Loading branch information
WezSieTato committed Jan 24, 2016
1 parent c0bd1cf commit 2ae93eb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
12 changes: 6 additions & 6 deletions MSAddition.xcodeproj/project.pbxproj
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
657AD92D1A9E223A00B27432 /* TestObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = 657AD92C1A9E223A00B27432 /* TestObjects.m */; };
657AD92D1A9E223A00B27432 /* MSTestObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 657AD92C1A9E223A00B27432 /* MSTestObject.m */; };
657AD92F1A9E248000B27432 /* MSDateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 657AD92E1A9E248000B27432 /* MSDateTests.m */; };
9ED7EC041C5509CE0041F0A4 /* UIScrollView+MSAddition.m in Sources */ = {isa = PBXBuildFile; fileRef = 9ED7EC031C5509CE0041F0A4 /* UIScrollView+MSAddition.m */; };
9ED7EC071C550BB90041F0A4 /* UIPageViewController+MSAddition.m in Sources */ = {isa = PBXBuildFile; fileRef = 9ED7EC061C550BB90041F0A4 /* UIPageViewController+MSAddition.m */; };
Expand Down Expand Up @@ -45,8 +45,8 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
657AD92B1A9E223A00B27432 /* TestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObject.h; sourceTree = "<group>"; };
657AD92C1A9E223A00B27432 /* TestObjects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestObjects.m; sourceTree = "<group>"; };
657AD92B1A9E223A00B27432 /* MSTestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSTestObject.h; sourceTree = "<group>"; };
657AD92C1A9E223A00B27432 /* MSTestObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSTestObject.m; sourceTree = "<group>"; };
657AD92E1A9E248000B27432 /* MSDateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSDateTests.m; sourceTree = "<group>"; };
9ED7EC021C5509CE0041F0A4 /* UIScrollView+MSAddition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+MSAddition.h"; sourceTree = "<group>"; };
9ED7EC031C5509CE0041F0A4 /* UIScrollView+MSAddition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+MSAddition.m"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -171,8 +171,8 @@
D35FBA6F1A602D3800BB8A36 /* MSObjectTests.m */,
D3599B721A6F9FF800923BB3 /* MSViewTests.m */,
D346DBB21A77A61F005E85E2 /* MSArrayTests.m */,
657AD92B1A9E223A00B27432 /* TestObject.h */,
657AD92C1A9E223A00B27432 /* TestObjects.m */,
657AD92B1A9E223A00B27432 /* MSTestObject.h */,
657AD92C1A9E223A00B27432 /* MSTestObject.m */,
657AD92E1A9E248000B27432 /* MSDateTests.m */,
9ED7EC0E1C5510970041F0A4 /* MSMutableArrayTests.m */,
);
Expand Down Expand Up @@ -324,7 +324,7 @@
9ED7EC0F1C5510970041F0A4 /* MSMutableArrayTests.m in Sources */,
D39113351A2F2BEE002014D2 /* MSStringTests.m in Sources */,
D39113331A2F2952002014D2 /* MSMutableStringTests.m in Sources */,
657AD92D1A9E223A00B27432 /* TestObjects.m in Sources */,
657AD92D1A9E223A00B27432 /* MSTestObject.m in Sources */,
D39113371A2F3249002014D2 /* MSDictionaryTests.m in Sources */,
D3599B731A6F9FF800923BB3 /* MSViewTests.m in Sources */,
D346DBB31A77A61F005E85E2 /* MSArrayTests.m in Sources */,
Expand Down
22 changes: 16 additions & 6 deletions MSAdditionTests/MSObjectTests.m
Expand Up @@ -8,7 +8,7 @@

#import <XCTest/XCTest.h>
#import "NSObject+MSAddition.h"
#import "TestObject.h"
#import "MSTestObject.h"

@interface MSObjectTest : XCTestCase

Expand All @@ -26,7 +26,7 @@ - (void)testIntPointerConversion{
}

- (void)testDictionaryRepresentation{
TestObject* test = [TestObject new];
MSTestObject* test = [MSTestObject new];
test.string = @"siema";
test.number = @1;
NSDictionary* result = @{
Expand All @@ -38,7 +38,7 @@ - (void)testDictionaryRepresentation{
}

- (void)testDictionaryRepresentationForKeys{
TestObject* test = [TestObject new];
MSTestObject* test = [MSTestObject new];
test.string = @"siema";
test.number = @1;
NSArray* keys = @[@"string"];
Expand All @@ -49,13 +49,23 @@ - (void)testDictionaryRepresentationForKeys{
XCTAssertEqualObjects(representation, result);
}

- (void)testDescriptionForKeys{
TestObject* test = [TestObject new];
- (void)testDescriptionForKeysShouldPrintEveryValues{
MSTestObject* test = [MSTestObject new];
test.string = @"siema";
test.number = @1;

NSArray* keys = @[@"string", @"number"];
NSString* expected = @"TestObject:{\n\tstring : siema\n\tnumber : 1\n}";
NSString* expected = @"MSTestObject:{\n\tstring : siema\n\tnumber : 1\n}";

XCTAssertEqualObjects([test ms_descriptionFromProperties:keys], expected);
}

- (void)testDescriptionForKeysShouldPrintValueAndNil{
MSTestObject* test = [MSTestObject new];
test.string = @"siema";

NSArray* keys = @[@"string", @"number"];
NSString* expected = @"MSTestObject:{\n\tstring : siema\n\tnumber : nil\n}";

XCTAssertEqualObjects([test ms_descriptionFromProperties:keys], expected);
}
Expand Down
Expand Up @@ -8,7 +8,7 @@

#import <Foundation/Foundation.h>

@interface TestObject : NSObject
@interface MSTestObject : NSObject

@property (strong, nonatomic) NSNumber* number;
@property (strong, nonatomic) NSString* string;
Expand Down
Expand Up @@ -6,8 +6,8 @@
// Copyright (c) 2015 siema. All rights reserved.
//

#import "TestObject.h"
#import "MSTestObject.h"

@implementation TestObject
@implementation MSTestObject

@end

0 comments on commit 2ae93eb

Please sign in to comment.