Migrated some tests to use System.Text.Json (#385)

* Migrated some tests to use System.Text.Json

* Added case insensitive json options to fix broken tests.
This commit is contained in:
Steve Smith
2020-05-28 15:48:24 -04:00
committed by GitHub
parent bb977b6fdf
commit 3030e97af6
4 changed files with 12 additions and 9 deletions

View File

@@ -57,9 +57,9 @@ namespace Microsoft.eShopWeb.Web.Services
Name = i.Name,
PictureUri = _uriComposer.ComposePicUri(i.PictureUri),
Price = i.Price
}),
Brands = await GetBrands(),
Types = await GetTypes(),
}).ToList(),
Brands = (await GetBrands()).ToList(),
Types = (await GetTypes()).ToList(),
BrandFilterApplied = brandId ?? 0,
TypesFilterApplied = typeId ?? 0,
PaginationInfo = new PaginationInfoViewModel()

View File

@@ -5,9 +5,9 @@ namespace Microsoft.eShopWeb.Web.ViewModels
{
public class CatalogIndexViewModel
{
public IEnumerable<CatalogItemViewModel> CatalogItems { get; set; }
public IEnumerable<SelectListItem> Brands { get; set; }
public IEnumerable<SelectListItem> Types { get; set; }
public List<CatalogItemViewModel> CatalogItems { get; set; }
public List<SelectListItem> Brands { get; set; }
public List<SelectListItem> Types { get; set; }
public int? BrandFilterApplied { get; set; }
public int? TypesFilterApplied { get; set; }
public PaginationInfoViewModel PaginationInfo { get; set; }

View File

@@ -34,6 +34,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Catalog\" />
<Folder Include="wwwroot\fonts\" />
<Folder Include="wwwroot\lib\" />
</ItemGroup>