Skip to content

Commit 6b1cffa

Browse files
committed
Refactored unit tests to remove compiler warnings.
1 parent c666c36 commit 6b1cffa

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/BasketServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public async Task GetFakeBasketTest()
1111
{
1212
var catalogMockService = new CatalogMockService();
1313
var result = await catalogMockService.GetCatalogAsync();
14-
Assert.NotEqual(0, result.Count);
14+
Assert.NotEmpty(result);
1515
}
1616
}
1717
}

src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/CatalogServiceTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public async Task GetFakeCatalogTest()
1212
var catalogMockService = new CatalogMockService();
1313
var catalog = await catalogMockService.GetCatalogAsync();
1414

15-
Assert.NotEqual(0, catalog.Count);
15+
Assert.NotEmpty(catalog);
1616
}
1717

1818
[Fact]
@@ -21,7 +21,7 @@ public async Task GetFakeCatalogBrandTest()
2121
var catalogMockService = new CatalogMockService();
2222
var catalogBrand = await catalogMockService.GetCatalogBrandAsync();
2323

24-
Assert.NotEqual(0, catalogBrand.Count);
24+
Assert.NotEmpty(catalogBrand);
2525
}
2626

2727
[Fact]
@@ -30,7 +30,7 @@ public async Task GetFakeCatalogTypeTest()
3030
var catalogMockService = new CatalogMockService();
3131
var catalogType = await catalogMockService.GetCatalogTypeAsync();
3232

33-
Assert.NotEqual(0, catalogType.Count);
33+
Assert.NotEmpty(catalogType);
3434
}
3535
}
3636
}

src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/MarketingServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public async Task GetFakeCampaignsTest()
2323
var campaignMockService = new CampaignMockService();
2424
var result = await campaignMockService.GetAllCampaignsAsync(GlobalSetting.Instance.AuthToken);
2525

26-
Assert.NotEqual(0, result.Count);
26+
Assert.NotEmpty(result);
2727
}
2828
}
2929
}

src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/OrdersServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public async Task GetFakeOrdersTest()
2222
var ordersMockService = new OrderMockService();
2323
var result = await ordersMockService.GetOrdersAsync(GlobalSetting.Instance.AuthToken);
2424

25-
Assert.NotEqual(0, result.Count);
25+
Assert.NotEmpty(result);
2626
}
2727
}
2828
}

0 commit comments

Comments
 (0)