fix some issue and cover by test (#669)
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
|
||||
using Microsoft.eShopWeb.Infrastructure.Identity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Microsoft.eShopWeb.Web.Areas.Identity.Pages.Account;
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using MediatR;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.eShopWeb.Web.Features.MyOrders;
|
||||
|
||||
@@ -12,6 +12,6 @@ public class BasketItemViewModel
|
||||
|
||||
[Range(0, int.MaxValue, ErrorMessage = "Quantity must be bigger than 0")]
|
||||
public int Quantity { get; set; }
|
||||
|
||||
|
||||
public string? PictureUrl { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Microsoft.eShopWeb.Web.ViewModels.Manage;
|
||||
|
||||
public class IndexViewModel
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string? Username { get; set; }
|
||||
|
||||
public bool IsEmailConfirmed { get; set; }
|
||||
|
||||
@@ -16,5 +16,5 @@ public class IndexViewModel
|
||||
[Display(Name = "Phone number")]
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
public string StatusMessage { get; set; }
|
||||
public string? StatusMessage { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>disable</Nullable>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>Microsoft.eShopWeb.Web</RootNamespace>
|
||||
<UserSecretsId>aspnet-Web2-1FA3F72E-E7E3-4360-9E49-1CCCD7FE85F7</UserSecretsId>
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Xunit;
|
||||
|
||||
@@ -54,35 +49,65 @@ public class AccountControllerSignIn : IClassFixture<TestApplication>
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse = await response.Content.ReadAsStringAsync();
|
||||
|
||||
string token = GetRequestVerificationToken(stringResponse);
|
||||
string token = WebPageHelpers.GetRequestVerificationToken(stringResponse);
|
||||
Assert.True(token.Length > 50);
|
||||
}
|
||||
|
||||
private string GetRequestVerificationToken(string input)
|
||||
{
|
||||
string regexpression = @"name=""__RequestVerificationToken"" type=""hidden"" value=""([-A-Za-z0-9+=/\\_]+?)""";
|
||||
var regex = new Regex(regexpression);
|
||||
var match = regex.Match(input);
|
||||
return match.Groups.Values.LastOrDefault().Value;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ReturnsSuccessfulSignInOnPostWithValidCredentials()
|
||||
{
|
||||
var getResponse = await Client.GetAsync("/identity/account/login");
|
||||
getResponse.EnsureSuccessStatusCode();
|
||||
var stringResponse1 = await getResponse.Content.ReadAsStringAsync();
|
||||
string token = GetRequestVerificationToken(stringResponse1);
|
||||
|
||||
var keyValues = new List<KeyValuePair<string, string>>();
|
||||
keyValues.Add(new KeyValuePair<string, string>("Email", "demouser@microsoft.com"));
|
||||
keyValues.Add(new KeyValuePair<string, string>("Password", "Pass@word1"));
|
||||
|
||||
keyValues.Add(new KeyValuePair<string, string>("__RequestVerificationToken", token));
|
||||
var keyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("Email", "demouser@microsoft.com"),
|
||||
new KeyValuePair<string, string>("Password", "Pass@word1"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(stringResponse1))
|
||||
};
|
||||
var formContent = new FormUrlEncodedContent(keyValues);
|
||||
|
||||
var postResponse = await Client.PostAsync("/identity/account/login", formContent);
|
||||
Assert.Equal(HttpStatusCode.Redirect, postResponse.StatusCode);
|
||||
Assert.Equal(new System.Uri("/", UriKind.Relative), postResponse.Headers.Location);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task UpdatePhoneNumberProfile()
|
||||
{
|
||||
//Login
|
||||
var getResponse = await Client.GetAsync("/identity/account/login");
|
||||
getResponse.EnsureSuccessStatusCode();
|
||||
var stringResponse1 = await getResponse.Content.ReadAsStringAsync();
|
||||
var keyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("Email", "demouser@microsoft.com"),
|
||||
new KeyValuePair<string, string>("Password", "Pass@word1"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(stringResponse1))
|
||||
};
|
||||
var formContent = new FormUrlEncodedContent(keyValues);
|
||||
await Client.PostAsync("/identity/account/login", formContent);
|
||||
|
||||
//Profile page
|
||||
var profileResponse = await Client.GetAsync("/manage/my-account");
|
||||
profileResponse.EnsureSuccessStatusCode();
|
||||
var stringProfileResponse = await profileResponse.Content.ReadAsStringAsync();
|
||||
|
||||
//Update phone number
|
||||
var updateProfileValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("Email", "demouser@microsoft.com"),
|
||||
new KeyValuePair<string, string>("PhoneNumber", "03656565"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(stringProfileResponse))
|
||||
};
|
||||
var updateProfileContent = new FormUrlEncodedContent(updateProfileValues);
|
||||
var postProfileResponse = await Client.PostAsync("/manage/my-account", updateProfileContent);
|
||||
|
||||
Assert.Equal(HttpStatusCode.Redirect, postProfileResponse.StatusCode);
|
||||
var profileResponse2 = await Client.GetAsync("/manage/my-account");
|
||||
var stringProfileResponse2 = await profileResponse2.Content.ReadAsStringAsync();
|
||||
Assert.Contains("03656565", stringProfileResponse2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.eShopWeb.FunctionalTests.Web;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.WebRazorPages;
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Pages.Basket;
|
||||
|
||||
[Collection("Sequential")]
|
||||
public class BasketPageCheckout : IClassFixture<TestApplication>
|
||||
@@ -22,45 +16,32 @@ public class BasketPageCheckout : IClassFixture<TestApplication>
|
||||
|
||||
public HttpClient Client { get; }
|
||||
|
||||
private string GetRequestVerificationToken(string input)
|
||||
{
|
||||
string regexpression = @"name=""__RequestVerificationToken"" type=""hidden"" value=""([-A-Za-z0-9+=/\\_]+?)""";
|
||||
var regex = new Regex(regexpression);
|
||||
var match = regex.Match(input);
|
||||
return match.Groups.Values.LastOrDefault().Value;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task RedirectsToLoginIfNotAuthenticated()
|
||||
{
|
||||
// Arrange & Act
|
||||
|
||||
// Load Home Page
|
||||
var response = await Client.GetAsync("/");
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse1 = await response.Content.ReadAsStringAsync();
|
||||
|
||||
string token = GetRequestVerificationToken(stringResponse1);
|
||||
string token = WebPageHelpers.GetRequestVerificationToken(stringResponse1);
|
||||
|
||||
// Add Item to Cart
|
||||
var keyValues = new List<KeyValuePair<string, string>>();
|
||||
keyValues.Add(new KeyValuePair<string, string>("id", "2"));
|
||||
keyValues.Add(new KeyValuePair<string, string>("name", "shirt"));
|
||||
|
||||
keyValues.Add(new KeyValuePair<string, string>("price", "19.49"));
|
||||
keyValues.Add(new KeyValuePair<string, string>("__RequestVerificationToken", token));
|
||||
|
||||
var keyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("id", "2"),
|
||||
new KeyValuePair<string, string>("name", "shirt"),
|
||||
new KeyValuePair<string, string>("price", "19.49"),
|
||||
new KeyValuePair<string, string>("__RequestVerificationToken", token)
|
||||
};
|
||||
var formContent = new FormUrlEncodedContent(keyValues);
|
||||
|
||||
var postResponse = await Client.PostAsync("/basket/index", formContent);
|
||||
postResponse.EnsureSuccessStatusCode();
|
||||
var stringResponse = await postResponse.Content.ReadAsStringAsync();
|
||||
|
||||
// Assert
|
||||
Assert.Contains(".NET Black & White Mug", stringResponse);
|
||||
|
||||
keyValues.Clear();
|
||||
keyValues.Add(new KeyValuePair<string, string>("__RequestVerificationToken", token));
|
||||
|
||||
formContent = new FormUrlEncodedContent(keyValues);
|
||||
var postResponse2 = await Client.PostAsync("/Basket/Checkout", formContent);
|
||||
68
tests/FunctionalTests/Web/Pages/Basket/CheckoutTest.cs
Normal file
68
tests/FunctionalTests/Web/Pages/Basket/CheckoutTest.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Pages.Basket;
|
||||
|
||||
[Collection("Sequential")]
|
||||
public class CheckoutTest : IClassFixture<TestApplication>
|
||||
{
|
||||
public CheckoutTest(TestApplication factory)
|
||||
{
|
||||
Client = factory.CreateClient(new WebApplicationFactoryClientOptions
|
||||
{
|
||||
AllowAutoRedirect = true
|
||||
});
|
||||
}
|
||||
|
||||
public HttpClient Client { get; }
|
||||
|
||||
[Fact]
|
||||
public async Task SucessfullyPay()
|
||||
{
|
||||
|
||||
// Load Home Page
|
||||
var response = await Client.GetAsync("/");
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// Add Item to Cart
|
||||
var keyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("id", "2"),
|
||||
new KeyValuePair<string, string>("name", "shirt"),
|
||||
new KeyValuePair<string, string>("price", "19.49"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(stringResponse))
|
||||
};
|
||||
var formContent = new FormUrlEncodedContent(keyValues);
|
||||
var postResponse = await Client.PostAsync("/basket/index", formContent);
|
||||
postResponse.EnsureSuccessStatusCode();
|
||||
var stringPostResponse = await postResponse.Content.ReadAsStringAsync();
|
||||
Assert.Contains(".NET Black & White Mug", stringPostResponse);
|
||||
|
||||
//Load login page
|
||||
var loginResponse = await Client.GetAsync("/Identity/Account/Login");
|
||||
var longinKeyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("email", "demouser@microsoft.com"),
|
||||
new KeyValuePair<string, string>("password", "Pass@word1"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(await loginResponse.Content.ReadAsStringAsync()))
|
||||
};
|
||||
var loginFormContent = new FormUrlEncodedContent(longinKeyValues);
|
||||
var loginPostResponse = await Client.PostAsync("/Identity/Account/Login?ReturnUrl=%2FBasket%2FCheckout", loginFormContent);
|
||||
var loginStringResponse = await loginPostResponse.Content.ReadAsStringAsync();
|
||||
|
||||
//Basket checkout (Pay now)
|
||||
var checkOutKeyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("Items[0].Id", "2"),
|
||||
new KeyValuePair<string, string>("Items[0].Quantity", "1"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(loginStringResponse))
|
||||
};
|
||||
var checkOutContent = new FormUrlEncodedContent(checkOutKeyValues);
|
||||
var checkOutResponse = await Client.PostAsync("/basket/checkout", checkOutContent);
|
||||
var stringCheckOutResponse = await checkOutResponse.Content.ReadAsStringAsync();
|
||||
|
||||
Assert.Contains("/Basket/Success", checkOutResponse.RequestMessage.RequestUri.ToString());
|
||||
Assert.Contains("Thanks for your Order!", stringCheckOutResponse);
|
||||
}
|
||||
}
|
||||
100
tests/FunctionalTests/Web/Pages/Basket/IndexTest.cs
Normal file
100
tests/FunctionalTests/Web/Pages/Basket/IndexTest.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web.Pages.Basket;
|
||||
|
||||
[Collection("Sequential")]
|
||||
public class IndexTest : IClassFixture<TestApplication>
|
||||
{
|
||||
public IndexTest(TestApplication factory)
|
||||
{
|
||||
Client = factory.CreateClient(new WebApplicationFactoryClientOptions
|
||||
{
|
||||
AllowAutoRedirect = true
|
||||
});
|
||||
}
|
||||
|
||||
public HttpClient Client { get; }
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task OnPostUpdateTo50Successfully()
|
||||
{
|
||||
// Load Home Page
|
||||
var response = await Client.GetAsync("/");
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse1 = await response.Content.ReadAsStringAsync();
|
||||
|
||||
string token = WebPageHelpers.GetRequestVerificationToken(stringResponse1);
|
||||
|
||||
// Add Item to Cart
|
||||
var keyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("id", "2"),
|
||||
new KeyValuePair<string, string>("name", "shirt"),
|
||||
new KeyValuePair<string, string>("price", "19.49"),
|
||||
new KeyValuePair<string, string>("__RequestVerificationToken", token)
|
||||
};
|
||||
var formContent = new FormUrlEncodedContent(keyValues);
|
||||
var postResponse = await Client.PostAsync("/basket/index", formContent);
|
||||
postResponse.EnsureSuccessStatusCode();
|
||||
var stringResponse = await postResponse.Content.ReadAsStringAsync();
|
||||
Assert.Contains(".NET Black & White Mug", stringResponse);
|
||||
|
||||
//Update
|
||||
var updateKeyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("Items[0].Id", WebPageHelpers.GetId(stringResponse)),
|
||||
new KeyValuePair<string, string>("Items[0].Quantity", "50"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(stringResponse))
|
||||
};
|
||||
var updateContent = new FormUrlEncodedContent(updateKeyValues);
|
||||
var updateResponse = await Client.PostAsync("/basket/update", updateContent);
|
||||
|
||||
var stringUpdateResponse = await updateResponse.Content.ReadAsStringAsync();
|
||||
|
||||
Assert.Contains("/basket/update", updateResponse.RequestMessage.RequestUri.ToString());
|
||||
Assert.Contains("974.50", stringUpdateResponse);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task OnPostUpdateTo0EmptyBasket()
|
||||
{
|
||||
// Load Home Page
|
||||
var response = await Client.GetAsync("/");
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stringResponse1 = await response.Content.ReadAsStringAsync();
|
||||
|
||||
string token = WebPageHelpers.GetRequestVerificationToken(stringResponse1);
|
||||
|
||||
// Add Item to Cart
|
||||
var keyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("id", "2"),
|
||||
new KeyValuePair<string, string>("name", "shirt"),
|
||||
new KeyValuePair<string, string>("price", "19.49"),
|
||||
new KeyValuePair<string, string>("__RequestVerificationToken", token)
|
||||
};
|
||||
var formContent = new FormUrlEncodedContent(keyValues);
|
||||
var postResponse = await Client.PostAsync("/basket/index", formContent);
|
||||
postResponse.EnsureSuccessStatusCode();
|
||||
var stringResponse = await postResponse.Content.ReadAsStringAsync();
|
||||
Assert.Contains(".NET Black & White Mug", stringResponse);
|
||||
|
||||
//Update
|
||||
var updateKeyValues = new List<KeyValuePair<string, string>>
|
||||
{
|
||||
new KeyValuePair<string, string>("Items[0].Id", WebPageHelpers.GetId(stringResponse)),
|
||||
new KeyValuePair<string, string>("Items[0].Quantity", "0"),
|
||||
new KeyValuePair<string, string>(WebPageHelpers.TokenTag, WebPageHelpers.GetRequestVerificationToken(stringResponse))
|
||||
};
|
||||
var updateContent = new FormUrlEncodedContent(updateKeyValues);
|
||||
var updateResponse = await Client.PostAsync("/basket/update", updateContent);
|
||||
|
||||
var stringUpdateResponse = await updateResponse.Content.ReadAsStringAsync();
|
||||
|
||||
Assert.Contains("/basket/update", updateResponse.RequestMessage.RequestUri.ToString());
|
||||
Assert.Contains("Basket is empty", stringUpdateResponse);
|
||||
|
||||
}
|
||||
}
|
||||
27
tests/FunctionalTests/Web/WebPageHelpers.cs
Normal file
27
tests/FunctionalTests/Web/WebPageHelpers.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Microsoft.eShopWeb.FunctionalTests.Web;
|
||||
|
||||
public static class WebPageHelpers
|
||||
{
|
||||
public static string TokenTag = "__RequestVerificationToken";
|
||||
|
||||
public static string GetRequestVerificationToken(string input)
|
||||
{
|
||||
string regexpression = @"name=""__RequestVerificationToken"" type=""hidden"" value=""([-A-Za-z0-9+=/\\_]+?)""";
|
||||
return RegexSearch(regexpression, input);
|
||||
}
|
||||
|
||||
public static string GetId(string input)
|
||||
{
|
||||
string regexpression = @"name=""Items\[0\].Id"" value=""(\d)""";
|
||||
return RegexSearch(regexpression, input);
|
||||
}
|
||||
|
||||
private static string RegexSearch(string regexpression, string input)
|
||||
{
|
||||
var regex = new Regex(regexpression);
|
||||
var match = regex.Match(input);
|
||||
return match.Groups.Values.LastOrDefault().Value;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.eShopWeb;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Constants;
|
||||
using Microsoft.eShopWeb.PublicApi.AuthEndpoints;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PublicApiIntegrationTests.AuthEndpoints
|
||||
{
|
||||
[TestClass]
|
||||
public class AuthenticateEndpoint
|
||||
{
|
||||
{
|
||||
[TestMethod]
|
||||
[DataRow("demouser@microsoft.com", AuthorizationConstants.DEFAULT_PASSWORD, true)]
|
||||
[DataRow("demouser@microsoft.com", "badpassword", false)]
|
||||
@@ -33,4 +32,4 @@ namespace PublicApiIntegrationTests.AuthEndpoints
|
||||
Assert.AreEqual(expectedResult, model.Result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Microsoft.eShopWeb.UnitTests</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user