settings, IHttpContextAccessor httpContextAccesor, IHttpClient httpClient)
{
- _remoteServiceBaseUrl = $"{settings.Value.PurchaseUrl}/api/v1/o/orders";
+ _remoteServiceBaseUrl = $"{settings.Value.OrderingUrl}/api/v1/orders";
_settings = settings;
_httpContextAccesor = httpContextAccesor;
_apiClient = httpClient;
diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs
index 4bc2d8b88..105b1ed9e 100644
--- a/src/Web/WebMVC/Startup.cs
+++ b/src/Web/WebMVC/Startup.cs
@@ -130,7 +130,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
options.Scope.Add("basket");
options.Scope.Add("marketing");
options.Scope.Add("locations");
- options.Scope.Add("webshoppingagg");
});
}
diff --git a/src/Web/WebMVC/ViewModels/CatalogItem.cs b/src/Web/WebMVC/ViewModels/CatalogItem.cs
index c869b7382..6dd216d1d 100644
--- a/src/Web/WebMVC/ViewModels/CatalogItem.cs
+++ b/src/Web/WebMVC/ViewModels/CatalogItem.cs
@@ -4,7 +4,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewModels
{
public class CatalogItem
{
- public int Id { get; set; }
+ public string Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public decimal Price { get; set; }
diff --git a/src/Web/WebMVC/Views/Catalog/_product.cshtml b/src/Web/WebMVC/Views/Catalog/_product.cshtml
index 0fb1c39c4..11138b55d 100644
--- a/src/Web/WebMVC/Views/Catalog/_product.cshtml
+++ b/src/Web/WebMVC/Views/Catalog/_product.cshtml
@@ -12,5 +12,13 @@
@Model.Price.ToString("N2")
+
+
+
+
+
+
+
+
diff --git a/src/Web/WebSPA/AppSettings.cs b/src/Web/WebSPA/AppSettings.cs
index c3fbd3b80..fd254c3ae 100644
--- a/src/Web/WebSPA/AppSettings.cs
+++ b/src/Web/WebSPA/AppSettings.cs
@@ -7,13 +7,13 @@ namespace eShopOnContainers.WebSPA
{
public class AppSettings
{
+ public string BaseUrl { get; set; }
+ public string CatalogUrl { get; set; }
+ public string OrderingUrl { get; set; }
public string IdentityUrl { get; set; }
public string BasketUrl { get; set; }
public string MarketingUrl { get; set; }
-
- public string PurchaseUrl { get; set; }
-
public string ActivateCampaignDetailFunction { get; set; }
- public bool UseCustomizationData { get; set; }
+ public bool UseCustomizationData { get; set; }
}
}
diff --git a/src/Web/WebSPA/Client/modules/basket/basket.service.ts b/src/Web/WebSPA/Client/modules/basket/basket.service.ts
index fef74974e..864915541 100644
--- a/src/Web/WebSPA/Client/modules/basket/basket.service.ts
+++ b/src/Web/WebSPA/Client/modules/basket/basket.service.ts
@@ -23,7 +23,6 @@ import { Subject } from 'rxjs/Subject';
@Injectable()
export class BasketService {
private basketUrl: string = '';
- private purchaseUrl: string = '';
basket: IBasket = {
buyerId: '',
items: []
@@ -41,14 +40,12 @@ export class BasketService {
if (this.authService.UserData) {
this.basket.buyerId = this.authService.UserData.sub;
if (this.configurationService.isReady) {
- this.basketUrl = this.configurationService.serverSettings.purchaseUrl;
- this.purchaseUrl = this.configurationService.serverSettings.purchaseUrl;
+ this.basketUrl = this.configurationService.serverSettings.basketUrl;
this.loadData();
}
else {
this.configurationService.settingsLoaded$.subscribe(x => {
- this.basketUrl = this.configurationService.serverSettings.purchaseUrl;
- this.purchaseUrl = this.configurationService.serverSettings.purchaseUrl;
+ this.basketUrl = this.configurationService.serverSettings.basketUrl;
this.loadData();
});
}
@@ -66,7 +63,7 @@ export class BasketService {
}
setBasket(basket): Observable {
- let url = this.purchaseUrl + '/api/v1/basket/';
+ let url = this.basketUrl + '/api/v1/basket/';
this.basket = basket;
return this.service.post(url, basket).map((response: Response) => {
return true;
@@ -74,7 +71,7 @@ export class BasketService {
}
setBasketCheckout(basketCheckout): Observable {
- let url = this.basketUrl + '/api/v1/b/basket/checkout';
+ let url = this.basketUrl + '/api/v1/basket/checkout';
return this.service.postWithId(url, basketCheckout).map((response: Response) => {
this.basketEvents.orderCreated();
return true;
@@ -82,7 +79,7 @@ export class BasketService {
}
getBasket(): Observable {
- let url = this.basketUrl + '/api/v1/b/basket/' + this.basket.buyerId;
+ let url = this.basketUrl + '/api/v1/basket/' + this.basket.buyerId;
return this.service.get(url).map((response: Response) => {
if (response.status === 204) {
return null;
diff --git a/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts b/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts
index 2a8973322..bd1678f44 100644
--- a/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts
+++ b/src/Web/WebSPA/Client/modules/campaigns/campaigns.service.ts
@@ -33,7 +33,7 @@ export class CampaignsService {
}
getCampaigns(pageIndex: number, pageSize: number): Observable {
- let url = this.marketingUrl + '/api/v1/m/campaigns/user';
+ let url = this.marketingUrl + '/api/v1/campaigns/user';
url = url + '?pageIndex=' + pageIndex + '&pageSize=' + pageSize;
return this.service.get(url).map((response: Response) => {
@@ -42,7 +42,7 @@ export class CampaignsService {
}
getCampaign(id: number): Observable {
- let url = this.marketingUrl + '/api/v1/m/campaigns/' + id;
+ let url = this.marketingUrl + '/api/v1/campaigns/' + id;
return this.service.get(url).map((response: Response) => {
return response.json();
diff --git a/src/Web/WebSPA/Client/modules/catalog/catalog.service.ts b/src/Web/WebSPA/Client/modules/catalog/catalog.service.ts
index fc5bc4c5e..bdcb9d664 100644
--- a/src/Web/WebSPA/Client/modules/catalog/catalog.service.ts
+++ b/src/Web/WebSPA/Client/modules/catalog/catalog.service.ts
@@ -21,9 +21,9 @@ export class CatalogService {
constructor(private service: DataService, private configurationService: ConfigurationService) {
this.configurationService.settingsLoaded$.subscribe(x => {
- this.catalogUrl = this.configurationService.serverSettings.purchaseUrl + '/api/v1/c/catalog/items';
- this.brandUrl = this.configurationService.serverSettings.purchaseUrl + '/api/v1/c/catalog/catalogbrands';
- this.typesUrl = this.configurationService.serverSettings.purchaseUrl + '/api/v1/c/catalog/catalogtypes';
+ this.catalogUrl = this.configurationService.serverSettings.catalogUrl + '/api/v1/catalog/items';
+ this.brandUrl = this.configurationService.serverSettings.catalogUrl + '/api/v1/catalog/catalogbrands';
+ this.typesUrl = this.configurationService.serverSettings.catalogUrl + '/api/v1/catalog/catalogtypes';
});
}
diff --git a/src/Web/WebSPA/Client/modules/orders/orders.service.ts b/src/Web/WebSPA/Client/modules/orders/orders.service.ts
index 5c563f836..5eda7c8ce 100644
--- a/src/Web/WebSPA/Client/modules/orders/orders.service.ts
+++ b/src/Web/WebSPA/Client/modules/orders/orders.service.ts
@@ -22,14 +22,14 @@ export class OrdersService {
constructor(private service: DataService, private basketService: BasketWrapperService, private identityService: SecurityService, private configurationService: ConfigurationService) {
if (this.configurationService.isReady)
- this.ordersUrl = this.configurationService.serverSettings.purchaseUrl;
+ this.ordersUrl = this.configurationService.serverSettings.orderingUrl;
else
- this.configurationService.settingsLoaded$.subscribe(x => this.ordersUrl = this.configurationService.serverSettings.purchaseUrl);
+ this.configurationService.settingsLoaded$.subscribe(x => this.ordersUrl = this.configurationService.serverSettings.orderingUrl);
}
getOrders(): Observable {
- let url = this.ordersUrl + '/api/v1/o/orders';
+ let url = this.ordersUrl + '/api/v1/orders';
return this.service.get(url).map((response: Response) => {
return response.json();
@@ -37,7 +37,7 @@ export class OrdersService {
}
getOrder(id: number): Observable {
- let url = this.ordersUrl + '/api/v1/o/orders/' + id;
+ let url = this.ordersUrl + '/api/v1/orders/' + id;
return this.service.get(url).map((response: Response) => {
return response.json();
diff --git a/src/Web/WebSPA/Client/modules/shared/models/configuration.model.ts b/src/Web/WebSPA/Client/modules/shared/models/configuration.model.ts
index 49950e9d6..f22b28a3e 100644
--- a/src/Web/WebSPA/Client/modules/shared/models/configuration.model.ts
+++ b/src/Web/WebSPA/Client/modules/shared/models/configuration.model.ts
@@ -1,6 +1,8 @@
export interface IConfiguration {
+ catalogUrl: string,
+ orderingUrl: string,
identityUrl: string,
+ basketUrl: string,
marketingUrl: string,
- purchaseUrl: string,
activateCampaignDetailFunction: boolean
}
\ No newline at end of file
diff --git a/src/Web/WebSPA/Client/modules/shared/services/configuration.service.ts b/src/Web/WebSPA/Client/modules/shared/services/configuration.service.ts
index ea95275e0..d41786859 100644
--- a/src/Web/WebSPA/Client/modules/shared/services/configuration.service.ts
+++ b/src/Web/WebSPA/Client/modules/shared/services/configuration.service.ts
@@ -28,9 +28,11 @@ export class ConfigurationService {
console.log('server settings loaded');
this.serverSettings = response.json();
console.log(this.serverSettings);
+ this.storageService.store('basketUrl', this.serverSettings.basketUrl);
+ this.storageService.store('catalogUrl', this.serverSettings.catalogUrl);
this.storageService.store('identityUrl', this.serverSettings.identityUrl);
+ this.storageService.store('orderingUrl', this.serverSettings.orderingUrl);
this.storageService.store('marketingUrl', this.serverSettings.marketingUrl);
- this.storageService.store('purchaseUrl', this.serverSettings.purchaseUrl);
this.storageService.store('activateCampaignDetailFunction', this.serverSettings.activateCampaignDetailFunction);
this.isReady = true;
this.settingsLoadedSource.next();
diff --git a/src/Web/WebSPA/Client/modules/shared/services/security.service.ts b/src/Web/WebSPA/Client/modules/shared/services/security.service.ts
index 45007b5d1..483ea4ae4 100644
--- a/src/Web/WebSPA/Client/modules/shared/services/security.service.ts
+++ b/src/Web/WebSPA/Client/modules/shared/services/security.service.ts
@@ -82,7 +82,7 @@ export class SecurityService {
let client_id = 'js';
let redirect_uri = location.origin + '/';
let response_type = 'id_token token';
- let scope = 'openid profile orders basket marketing locations webshoppingagg';
+ let scope = 'openid profile orders basket marketing locations';
let nonce = 'N' + Math.random() + '' + Date.now();
let state = Date.now() + '' + Math.random();
diff --git a/src/Web/WebSPA/Properties/launchSettings.json b/src/Web/WebSPA/Properties/launchSettings.json
index eff752f63..fd33f59ec 100644
--- a/src/Web/WebSPA/Properties/launchSettings.json
+++ b/src/Web/WebSPA/Properties/launchSettings.json
@@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
- "applicationUrl": "http://localhost:58018/",
+ "applicationUrl": "http://localhost:5104/",
"sslPort": 0
}
},
diff --git a/src/Web/WebSPA/appsettings.json b/src/Web/WebSPA/appsettings.json
index 75f17ac35..7b1930f84 100644
--- a/src/Web/WebSPA/appsettings.json
+++ b/src/Web/WebSPA/appsettings.json
@@ -1,8 +1,10 @@
{
+ "CatalogUrl": "http://localhost:5101",
+ "OrderingUrl": "http://localhost:5102",
+ "BasketUrl": "http://localhost:5103",
"IdentityUrl": "http://localhost:5105",
"MarketingUrl": "http://localhost:5110",
"CallBackUrl": "http://localhost:5104/",
- "PurchaseUrl": "http://localhost:5200",
"UseCustomizationData": true,
"IsClusterEnv": "False",
"ActivateCampaignDetailFunction": true,
diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json
index 550b77da7..313a88257 100644
--- a/src/Web/WebSPA/package-lock.json
+++ b/src/Web/WebSPA/package-lock.json
@@ -1176,7 +1176,6 @@
"requires": {
"anymatch": "1.3.2",
"async-each": "1.0.1",
- "fsevents": "1.1.3",
"glob-parent": "2.0.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
@@ -2807,910 +2806,6 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
- "fsevents": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
- "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
- "dev": true,
- "optional": true,
- "requires": {
- "nan": "2.6.2",
- "node-pre-gyp": "0.6.39"
- },
- "dependencies": {
- "abbrev": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "ajv": {
- "version": "4.11.8",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "co": "4.6.0",
- "json-stable-stringify": "1.0.1"
- }
- },
- "ansi-regex": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "aproba": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "are-we-there-yet": {
- "version": "1.1.4",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "delegates": "1.0.0",
- "readable-stream": "2.2.9"
- }
- },
- "asn1": {
- "version": "0.2.3",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "assert-plus": {
- "version": "0.2.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "asynckit": {
- "version": "0.4.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "aws-sign2": {
- "version": "0.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "aws4": {
- "version": "1.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "balanced-match": {
- "version": "0.4.2",
- "bundled": true,
- "dev": true
- },
- "bcrypt-pbkdf": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "tweetnacl": "0.14.5"
- }
- },
- "block-stream": {
- "version": "0.0.9",
- "bundled": true,
- "dev": true,
- "requires": {
- "inherits": "2.0.3"
- }
- },
- "boom": {
- "version": "2.10.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "hoek": "2.16.3"
- }
- },
- "brace-expansion": {
- "version": "1.1.7",
- "bundled": true,
- "dev": true,
- "requires": {
- "balanced-match": "0.4.2",
- "concat-map": "0.0.1"
- }
- },
- "buffer-shims": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "caseless": {
- "version": "0.12.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "co": {
- "version": "4.6.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "code-point-at": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "combined-stream": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "delayed-stream": "1.0.0"
- }
- },
- "concat-map": {
- "version": "0.0.1",
- "bundled": true,
- "dev": true
- },
- "console-control-strings": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "core-util-is": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "cryptiles": {
- "version": "2.0.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "boom": "2.10.1"
- }
- },
- "dashdash": {
- "version": "1.14.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "debug": {
- "version": "2.6.8",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "deep-extend": {
- "version": "0.4.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "delayed-stream": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "delegates": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "detect-libc": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "ecc-jsbn": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "jsbn": "0.1.1"
- }
- },
- "extend": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "extsprintf": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "forever-agent": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "form-data": {
- "version": "2.1.4",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "asynckit": "0.4.0",
- "combined-stream": "1.0.5",
- "mime-types": "2.1.15"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "fstream": {
- "version": "1.0.11",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "4.1.11",
- "inherits": "2.0.3",
- "mkdirp": "0.5.1",
- "rimraf": "2.6.1"
- }
- },
- "fstream-ignore": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "fstream": "1.0.11",
- "inherits": "2.0.3",
- "minimatch": "3.0.4"
- }
- },
- "gauge": {
- "version": "2.7.4",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "aproba": "1.1.1",
- "console-control-strings": "1.1.0",
- "has-unicode": "2.0.1",
- "object-assign": "4.1.1",
- "signal-exit": "3.0.2",
- "string-width": "1.0.2",
- "strip-ansi": "3.0.1",
- "wide-align": "1.1.2"
- }
- },
- "getpass": {
- "version": "0.1.7",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "glob": {
- "version": "7.1.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "fs.realpath": "1.0.0",
- "inflight": "1.0.6",
- "inherits": "2.0.3",
- "minimatch": "3.0.4",
- "once": "1.4.0",
- "path-is-absolute": "1.0.1"
- }
- },
- "graceful-fs": {
- "version": "4.1.11",
- "bundled": true,
- "dev": true
- },
- "har-schema": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "har-validator": {
- "version": "4.2.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "ajv": "4.11.8",
- "har-schema": "1.0.5"
- }
- },
- "has-unicode": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "hawk": {
- "version": "3.1.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "boom": "2.10.1",
- "cryptiles": "2.0.5",
- "hoek": "2.16.3",
- "sntp": "1.0.9"
- }
- },
- "hoek": {
- "version": "2.16.3",
- "bundled": true,
- "dev": true
- },
- "http-signature": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "0.2.0",
- "jsprim": "1.4.0",
- "sshpk": "1.13.0"
- }
- },
- "inflight": {
- "version": "1.0.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "once": "1.4.0",
- "wrappy": "1.0.2"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "bundled": true,
- "dev": true
- },
- "ini": {
- "version": "1.3.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "number-is-nan": "1.0.1"
- }
- },
- "is-typedarray": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "isarray": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "isstream": {
- "version": "0.1.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jodid25519": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "jsbn": "0.1.1"
- }
- },
- "jsbn": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "json-schema": {
- "version": "0.2.3",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "json-stable-stringify": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "jsonify": "0.0.0"
- }
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jsonify": {
- "version": "0.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "jsprim": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.0.2",
- "json-schema": "0.2.3",
- "verror": "1.3.6"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "mime-db": {
- "version": "1.27.0",
- "bundled": true,
- "dev": true
- },
- "mime-types": {
- "version": "2.1.15",
- "bundled": true,
- "dev": true,
- "requires": {
- "mime-db": "1.27.0"
- }
- },
- "minimatch": {
- "version": "3.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "brace-expansion": "1.1.7"
- }
- },
- "minimist": {
- "version": "0.0.8",
- "bundled": true,
- "dev": true
- },
- "mkdirp": {
- "version": "0.5.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "ms": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "node-pre-gyp": {
- "version": "0.6.39",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "detect-libc": "1.0.2",
- "hawk": "3.1.3",
- "mkdirp": "0.5.1",
- "nopt": "4.0.1",
- "npmlog": "4.1.0",
- "rc": "1.2.1",
- "request": "2.81.0",
- "rimraf": "2.6.1",
- "semver": "5.3.0",
- "tar": "2.2.1",
- "tar-pack": "3.4.0"
- }
- },
- "nopt": {
- "version": "4.0.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "abbrev": "1.1.0",
- "osenv": "0.1.4"
- }
- },
- "npmlog": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "are-we-there-yet": "1.1.4",
- "console-control-strings": "1.1.0",
- "gauge": "2.7.4",
- "set-blocking": "2.0.0"
- }
- },
- "number-is-nan": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "oauth-sign": {
- "version": "0.8.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "object-assign": {
- "version": "4.1.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "once": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "wrappy": "1.0.2"
- }
- },
- "os-homedir": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "osenv": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "os-homedir": "1.0.2",
- "os-tmpdir": "1.0.2"
- }
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "performance-now": {
- "version": "0.2.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "process-nextick-args": {
- "version": "1.0.7",
- "bundled": true,
- "dev": true
- },
- "punycode": {
- "version": "1.4.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "qs": {
- "version": "6.4.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "rc": {
- "version": "1.2.1",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "deep-extend": "0.4.2",
- "ini": "1.3.4",
- "minimist": "1.2.0",
- "strip-json-comments": "2.0.1"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "readable-stream": {
- "version": "2.2.9",
- "bundled": true,
- "dev": true,
- "requires": {
- "buffer-shims": "1.0.0",
- "core-util-is": "1.0.2",
- "inherits": "2.0.3",
- "isarray": "1.0.0",
- "process-nextick-args": "1.0.7",
- "string_decoder": "1.0.1",
- "util-deprecate": "1.0.2"
- }
- },
- "request": {
- "version": "2.81.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "aws-sign2": "0.6.0",
- "aws4": "1.6.0",
- "caseless": "0.12.0",
- "combined-stream": "1.0.5",
- "extend": "3.0.1",
- "forever-agent": "0.6.1",
- "form-data": "2.1.4",
- "har-validator": "4.2.1",
- "hawk": "3.1.3",
- "http-signature": "1.1.1",
- "is-typedarray": "1.0.0",
- "isstream": "0.1.2",
- "json-stringify-safe": "5.0.1",
- "mime-types": "2.1.15",
- "oauth-sign": "0.8.2",
- "performance-now": "0.2.0",
- "qs": "6.4.0",
- "safe-buffer": "5.0.1",
- "stringstream": "0.0.5",
- "tough-cookie": "2.3.2",
- "tunnel-agent": "0.6.0",
- "uuid": "3.0.1"
- }
- },
- "rimraf": {
- "version": "2.6.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "glob": "7.1.2"
- }
- },
- "safe-buffer": {
- "version": "5.0.1",
- "bundled": true,
- "dev": true
- },
- "semver": {
- "version": "5.3.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "sntp": {
- "version": "1.0.9",
- "bundled": true,
- "dev": true,
- "requires": {
- "hoek": "2.16.3"
- }
- },
- "sshpk": {
- "version": "1.13.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "asn1": "0.2.3",
- "assert-plus": "1.0.0",
- "bcrypt-pbkdf": "1.0.1",
- "dashdash": "1.14.1",
- "ecc-jsbn": "0.1.1",
- "getpass": "0.1.7",
- "jodid25519": "1.0.2",
- "jsbn": "0.1.1",
- "tweetnacl": "0.14.5"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "string-width": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "code-point-at": "1.1.0",
- "is-fullwidth-code-point": "1.0.0",
- "strip-ansi": "3.0.1"
- }
- },
- "string_decoder": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "safe-buffer": "5.0.1"
- }
- },
- "stringstream": {
- "version": "0.0.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "strip-ansi": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "2.1.1"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "tar": {
- "version": "2.2.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "block-stream": "0.0.9",
- "fstream": "1.0.11",
- "inherits": "2.0.3"
- }
- },
- "tar-pack": {
- "version": "3.4.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "debug": "2.6.8",
- "fstream": "1.0.11",
- "fstream-ignore": "1.0.5",
- "once": "1.4.0",
- "readable-stream": "2.2.9",
- "rimraf": "2.6.1",
- "tar": "2.2.1",
- "uid-number": "0.0.6"
- }
- },
- "tough-cookie": {
- "version": "2.3.2",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "punycode": "1.4.1"
- }
- },
- "tunnel-agent": {
- "version": "0.6.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "safe-buffer": "5.0.1"
- }
- },
- "tweetnacl": {
- "version": "0.14.5",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "uid-number": {
- "version": "0.0.6",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "util-deprecate": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "uuid": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "verror": {
- "version": "1.3.6",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "extsprintf": "1.0.2"
- }
- },
- "wide-align": {
- "version": "1.1.2",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "string-width": "1.0.2"
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
"fstream": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
diff --git a/test/Services/UnitTest/Basket/Application/CartControllerTest.cs b/test/Services/UnitTest/Basket/Application/CartControllerTest.cs
index 63f74cf35..6bdd2c43c 100644
--- a/test/Services/UnitTest/Basket/Application/CartControllerTest.cs
+++ b/test/Services/UnitTest/Basket/Application/CartControllerTest.cs
@@ -92,7 +92,7 @@ namespace UnitTest.Basket.Application
//Arrange
var fakeCatalogItem = GetFakeCatalogItem();
- _basketServiceMock.Setup(x => x.AddItemToBasket(It.IsAny(), It.IsAny()))
+ _basketServiceMock.Setup(x => x.AddItemToBasket(It.IsAny(), It.IsAny()))
.Returns(Task.FromResult(1));
//Act
@@ -118,7 +118,7 @@ namespace UnitTest.Basket.Application
{
return new CatalogItem()
{
- Id = 1,
+ Id = "1",
Name = "fakeName",
CatalogBrand = "fakeBrand",
CatalogType = "fakeType",
diff --git a/test/Services/UnitTest/Catalog/Application/CatalogControllerTest.cs b/test/Services/UnitTest/Catalog/Application/CatalogControllerTest.cs
index 7410551e4..58d32c212 100644
--- a/test/Services/UnitTest/Catalog/Application/CatalogControllerTest.cs
+++ b/test/Services/UnitTest/Catalog/Application/CatalogControllerTest.cs
@@ -67,19 +67,19 @@ namespace UnitTest.Catalog.Application
{
new CatalogItem()
{
- Id = 1,
+ Id = "1",
Name = "fakeItemA",
CatalogTypeId = 1
},
new CatalogItem()
{
- Id = 2,
+ Id = "2",
Name = "fakeItemB",
CatalogTypeId = 1
},
new CatalogItem()
{
- Id = 3,
+ Id = "3",
Name = "fakeItemC",
CatalogTypeId = 1
}
diff --git a/test/Services/UnitTest/Ordering/Application/OrderControllerTest.cs b/test/Services/UnitTest/Ordering/Application/OrderControllerTest.cs
index a60ce3bb3..12f2be395 100644
--- a/test/Services/UnitTest/Ordering/Application/OrderControllerTest.cs
+++ b/test/Services/UnitTest/Ordering/Application/OrderControllerTest.cs
@@ -68,7 +68,40 @@ namespace UnitTest.Ordering.Application
Assert.IsAssignableFrom(viewResult.ViewData.Model);
}
-
+ [Fact]
+ public async Task Get_create_order_success()
+ {
+ //Arrange
+ var fakeBuyerId = "1";
+ var fakeBasket = GetFakeBasket(fakeBuyerId);
+ var fakeOrder = GetFakeOrder();
+
+ _basketServiceMock.Setup(x => x.GetBasket(It.IsAny()))
+ .Returns(Task.FromResult(fakeBasket));
+
+ _basketServiceMock.Setup(x => x.MapBasketToOrder(It.IsAny()))
+ .Returns(fakeOrder);
+
+ _orderServiceMock.Setup(x => x.MapUserInfoIntoOrder(It.IsAny(), It.IsAny()))
+ .Returns(fakeOrder);
+
+ //Act
+ var orderController = new OrderController(_orderServiceMock.Object, _basketServiceMock.Object, _identityParserMock.Object);
+ orderController.ControllerContext.HttpContext = _contextMock.Object;
+ var actionResult = await orderController.Create();
+
+ //Assert
+ var viewResult = Assert.IsType(actionResult);
+ Assert.IsAssignableFrom(viewResult.ViewData.Model);
+ }
+
+ private BasketModel GetFakeBasket(string buyerId)
+ {
+ return new BasketModel()
+ {
+ BuyerId = buyerId
+ };
+ }
private Order GetFakeOrder()
{
diff --git a/xglobal.json b/xglobal.json
deleted file mode 100644
index 2ab18dceb..000000000
--- a/xglobal.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "sdk": {
- "version":"2.1.2"
- }
-}
\ No newline at end of file