Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (28 sloc) 0.948 kb
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
//
// ZincTrackingRefTest.m
// Zinc-ObjC
//
// Created by Andy Mroczkowski on 7/27/12.
// Copyright (c) 2012 MindSnacks. All rights reserved.
//

#import "ZincTrackingInfoTest.h"
#import "ZincTrackingInfo.h"

@implementation ZincTrackingInfoTest

- (void) _testDictionaryRoundtrip:(ZincTrackingInfo*)trackingRef
{
    NSDictionary* dict = [trackingRef dictionaryRepresentation];
    ZincTrackingInfo* ref2 = [ZincTrackingInfo trackingInfoFromDictionary:dict];
    STAssertEqualObjects(trackingRef, ref2, @"objects should be equal");
}

- (void) testBasicEquality
{
    ZincTrackingInfo* r1 = [[[ZincTrackingInfo alloc] init] autorelease];
    ZincTrackingInfo* r2 = [[[ZincTrackingInfo alloc] init] autorelease];
    
    STAssertEqualObjects(r1, r2, @"empty objects should be equal");
}

- (void) testReturnsNilDict
{
    ZincTrackingInfo* r1 = [ZincTrackingInfo trackingInfoFromDictionary:nil];
    STAssertNil(r1, @"should be nil");
}

@end
Something went wrong with that request. Please try again.