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
e8899caf
Commit
e8899caf
authored
Apr 29, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test shop data, update client test base with customer info.
parent
18c860b5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
BUYClientTestBase.h
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTestBase.h
+8
-0
BUYClientTestBase.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTestBase.m
+7
-0
BUYTestConstants.h
Mobile Buy SDK/Mobile Buy SDK Tests/BUYTestConstants.h
+2
-0
mocked_responses.json
Mobile Buy SDK/Mobile Buy SDK Tests/mocked_responses.json
+0
-0
test_shop_data.json
Mobile Buy SDK/Mobile Buy SDK Tests/test_shop_data.json
+7
-0
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTestBase.h
View file @
e8899caf
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
extern
NSString
*
const
BUYShopDomain_Placeholder
;
extern
NSString
*
const
BUYShopDomain_Placeholder
;
extern
NSString
*
const
BUYAPIKey_Placeholder
;
extern
NSString
*
const
BUYAPIKey_Placeholder
;
extern
NSString
*
const
BUYAppId_Placeholder
;
extern
NSString
*
const
BUYAppId_Placeholder
;
extern
NSString
*
const
BUYChannelId_Placeholder
;
extern
NSString
*
const
BUYFakeCustomerToken
;
@interface
BUYClientTestBase
:
XCTestCase
@interface
BUYClientTestBase
:
XCTestCase
...
@@ -37,6 +39,8 @@ extern NSString * const BUYAppId_Placeholder;
...
@@ -37,6 +39,8 @@ extern NSString * const BUYAppId_Placeholder;
@property
(
nonatomic
,
strong
)
NSString
*
apiKey
;
@property
(
nonatomic
,
strong
)
NSString
*
apiKey
;
@property
(
nonatomic
,
strong
)
NSString
*
appId
;
@property
(
nonatomic
,
strong
)
NSString
*
appId
;
@property
(
nonatomic
,
strong
)
NSString
*
merchantId
;
@property
(
nonatomic
,
strong
)
NSString
*
merchantId
;
@property
(
nonatomic
,
strong
)
NSString
*
customerEmail
;
@property
(
nonatomic
,
strong
)
NSString
*
customerPassword
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCode
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCode
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCode2
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCode2
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCode3
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCode3
;
...
@@ -45,7 +49,11 @@ extern NSString * const BUYAppId_Placeholder;
...
@@ -45,7 +49,11 @@ extern NSString * const BUYAppId_Placeholder;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCodeInvalid
;
@property
(
nonatomic
,
strong
)
NSString
*
giftCardCodeInvalid
;
@property
(
nonatomic
,
strong
)
NSString
*
discountCodeValid
;
@property
(
nonatomic
,
strong
)
NSString
*
discountCodeValid
;
@property
(
nonatomic
,
strong
)
NSString
*
discountCodeExpired
;
@property
(
nonatomic
,
strong
)
NSString
*
discountCodeExpired
;
@property
(
nonatomic
,
strong
)
NSArray
*
productIds
;
@property
(
nonatomic
,
strong
)
NSArray
*
productIds
;
@property
(
nonatomic
,
strong
)
NSNumber
*
variantUntrackedId
;
@property
(
nonatomic
,
strong
)
NSNumber
*
variantInventory1Id
;
@property
(
nonatomic
,
strong
)
NSNumber
*
variantSoldOutId
;
@property
(
nonatomic
,
strong
)
BUYClient
*
client
;
@property
(
nonatomic
,
strong
)
BUYClient
*
client
;
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTestBase.m
View file @
e8899caf
...
@@ -53,6 +53,9 @@ NSString * const BUYAppId_Placeholder = @"app_id";
...
@@ -53,6 +53,9 @@ NSString * const BUYAppId_Placeholder = @"app_id";
self
.
appId
=
environment
[
kBUYTestAppId
]
?:
jsonConfig
[
kBUYTestAppId
];
self
.
appId
=
environment
[
kBUYTestAppId
]
?:
jsonConfig
[
kBUYTestAppId
];
self
.
merchantId
=
environment
[
kBUYTestMerchantId
]
?:
jsonConfig
[
kBUYTestMerchantId
];
self
.
merchantId
=
environment
[
kBUYTestMerchantId
]
?:
jsonConfig
[
kBUYTestMerchantId
];
self
.
customerEmail
=
environment
[
kBUYTestEmail
]
?:
jsonConfig
[
kBUYTestEmail
];
self
.
customerPassword
=
environment
[
kBUYTestPassword
]
?:
jsonConfig
[
kBUYTestPassword
];
NSDictionary
*
giftCards
=
jsonConfig
[
@"gift_cards"
];
NSDictionary
*
giftCards
=
jsonConfig
[
@"gift_cards"
];
self
.
giftCardCode
=
environment
[
kBUYTestGiftCardCode11
]
?:
giftCards
[
@"valid11"
][
@"code"
];
self
.
giftCardCode
=
environment
[
kBUYTestGiftCardCode11
]
?:
giftCards
[
@"valid11"
][
@"code"
];
...
@@ -67,6 +70,10 @@ NSString * const BUYAppId_Placeholder = @"app_id";
...
@@ -67,6 +70,10 @@ NSString * const BUYAppId_Placeholder = @"app_id";
NSString
*
productIdsString
=
[
environment
[
kBUYTestProductIdsCommaSeparated
]
stringByReplacingOccurrencesOfString
:
@" "
withString
:
@""
];
NSString
*
productIdsString
=
[
environment
[
kBUYTestProductIdsCommaSeparated
]
stringByReplacingOccurrencesOfString
:
@" "
withString
:
@""
];
self
.
productIds
=
[
productIdsString
componentsSeparatedByString
:
@","
];
self
.
productIds
=
[
productIdsString
componentsSeparatedByString
:
@","
];
}
else
{
}
else
{
self
.
variantUntrackedId
=
jsonConfig
[
@"variants"
][
@"variant_untracked_id"
];
self
.
variantInventory1Id
=
jsonConfig
[
@"variants"
][
@"variant_inventory1_id"
];
self
.
variantSoldOutId
=
jsonConfig
[
@"variants"
][
@"variant_soldout_id"
];
self
.
productIds
=
jsonConfig
[
@"product_ids"
];
self
.
productIds
=
jsonConfig
[
@"product_ids"
];
}
}
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/BUYTestConstants.h
View file @
e8899caf
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
#define kBUYTestAPIKey @"api_key"
#define kBUYTestAPIKey @"api_key"
#define kBUYTestAppId @"app_id"
#define kBUYTestAppId @"app_id"
#define kBUYTestMerchantId @"merchant_id"
#define kBUYTestMerchantId @"merchant_id"
#define kBUYTestEmail @"customer_email"
#define kBUYTestPassword @"customer_password"
#define kBUYTestGiftCardCode11 @"gift_card_code_11"
#define kBUYTestGiftCardCode11 @"gift_card_code_11"
#define kBUYTestGiftCardCode25 @"gift_card_code_25"
#define kBUYTestGiftCardCode25 @"gift_card_code_25"
#define kBUYTestGiftCardCode50 @"gift_card_code_50"
#define kBUYTestGiftCardCode50 @"gift_card_code_50"
...
...
Mobile Buy SDK/Mobile Buy SDK Tests/mocked_responses.json
View file @
e8899caf
This diff is collapsed.
Click to expand it.
Mobile Buy SDK/Mobile Buy SDK Tests/test_shop_data.json
View file @
e8899caf
...
@@ -5,10 +5,17 @@
...
@@ -5,10 +5,17 @@
"channel_id"
:
""
,
"channel_id"
:
""
,
"app_id"
:
""
,
"app_id"
:
""
,
"merchant_id"
:
""
,
"merchant_id"
:
""
,
"customer_email"
:
""
,
"customer_password"
:
""
,
"product_ids"
:
[
"product_ids"
:
[
""
,
""
,
""
""
],
],
"variants"
:
{
"variant_untracked_id"
:
""
,
"variant_inventory1_id"
:
""
,
"variant_soldout_id"
:
""
},
"collection_id"
:
""
,
"collection_id"
:
""
,
"gift_cards"
:
{
"gift_cards"
:
{
"ValidGiftCard11"
:
{
"ValidGiftCard11"
:
{
...
...
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