summaryrefslogtreecommitdiff
path: root/JuickTests/JuickTests.m
blob: 6381bc6743e8da6bbfd2cd477cd37987ea8ec5fe (plain) (blame)
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
36
37
38
39
40
41
42
43
//
//  JuickTests.m
//  JuickTests
//
//  Created by Vitaly Takmazov on 10.02.2021.
//  Copyright © 2021 com.juick. All rights reserved.
//

@import UIKit;
#import <XCTest/XCTest.h>
#import "Message.h"

@interface JuickTests : XCTestCase

@end

@implementation JuickTests

- (void)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.
}

- (void)testMessageDeserialization {
    NSString *jsonData = @"{\"service\": true }";
    NSError *jsonError;
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[jsonData dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&jsonError];
    Message *msg = [Message fromJSON:json];
    XCTAssertTrue(msg.service);
    XCTAssertFalse(msg.unread);
}

- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

@end