Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
f2db7008
Commit
f2db7008
authored
May 09, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for consistency.
parent
5c1feefe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
BUYErrorTests.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYErrorTests.m
+4
-2
BUYOptionValueTests.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYOptionValueTests.m
+11
-5
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYErrorTests.m
View file @
f2db7008
...
...
@@ -33,7 +33,8 @@
@implementation
BUYErrorTests
-
(
void
)
testInitWithValidData
{
-
(
void
)
testInitWithValidData
{
NSDictionary
*
options
=
@{
@"option1"
:
@432
,
@"option2"
:
@"string"
,
...
...
@@ -53,7 +54,8 @@
XCTAssertEqualObjects
(
error
.
options
,
json
[
@"options"
]);
}
-
(
void
)
testDescription
{
-
(
void
)
testDescription
{
BUYError
*
error
=
[[
BUYError
alloc
]
initWithKey
:
@"testKey"
json
:@{
@"message"
:
@"some-message"
}];
XCTAssertEqualObjects
(
error
.
description
,
@"testKey some-message"
);
}
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYOptionValueTests.m
View file @
f2db7008
...
...
@@ -33,7 +33,8 @@
@implementation
BUYOptionValueTests
-
(
void
)
testInitWithValidData
{
-
(
void
)
testInitWithValidData
{
NSDictionary
*
json
=
[
self
jsonWithID
:
@84935
optionID
:
@749
];
BUYOptionValue
*
value
=
[[
BUYOptionValue
alloc
]
initWithDictionary
:
json
];
...
...
@@ -44,7 +45,8 @@
XCTAssertEqualObjects
(
value
.
optionId
,
json
[
@"option_id"
]);
}
-
(
void
)
testEqualOptions
{
-
(
void
)
testEqualOptions
{
BUYOptionValue
*
value1
=
[
self
optionValueWithID
:
@123
optionID
:
@321
];
BUYOptionValue
*
value2
=
[
self
optionValueWithID
:
@123
optionID
:
@321
];
...
...
@@ -53,7 +55,8 @@
XCTAssertEqual
(
value1
.
hash
,
value2
.
hash
);
}
-
(
void
)
testIdenticalOptions
{
-
(
void
)
testIdenticalOptions
{
BUYOptionValue
*
value1
=
[
self
optionValueWithID
:
@123
optionID
:
@321
];
BUYOptionValue
*
value2
=
value1
;
...
...
@@ -62,11 +65,14 @@
}
#pragma mark - Convenience -
-
(
BUYOptionValue
*
)
optionValueWithID
:
(
NSNumber
*
)
identifier
optionID
:
(
NSNumber
*
)
optionID
{
-
(
BUYOptionValue
*
)
optionValueWithID
:
(
NSNumber
*
)
identifier
optionID
:
(
NSNumber
*
)
optionID
{
return
[[
BUYOptionValue
alloc
]
initWithDictionary
:[
self
jsonWithID
:
identifier
optionID
:
optionID
]];
}
-
(
NSDictionary
*
)
jsonWithID
:
(
NSNumber
*
)
identifier
optionID
:
(
NSNumber
*
)
optionID
{
-
(
NSDictionary
*
)
jsonWithID
:
(
NSNumber
*
)
identifier
optionID
:
(
NSNumber
*
)
optionID
{
return
@{
@"id"
:
@19483
,
@"name"
:
@"option1"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment