-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIdTest.m
More file actions
35 lines (27 loc) · 873 Bytes
/
Copy pathIdTest.m
File metadata and controls
35 lines (27 loc) · 873 Bytes
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
35
//
// Created by HelloMihai
//
#import <XCTest/XCTest.h>
#import "IdClassForTesting.h"
@interface IdTest : XCTestCase
@end
@implementation IdTest
- (void)setUp
{
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testUserId
{
IdClassForTesting* testee = [[IdClassForTesting alloc] init]; // instantiate a new object
NSUInteger userId = 1234; // store the value for comparison
testee.userId = userId; // set the desired value
[testee calculationAffectingUserId]; // call the methods we need to test
XCTAssertEqual(userId, testee.userId, @"expected equal"); // test our value with the value in the class
}
@end