diff --git a/UnitTest/Bootstrap.Admin/Api/RegisterTest.cs b/UnitTest/Bootstrap.Admin/Api/RegisterTest.cs index 5adb6178..8ba32958 100644 --- a/UnitTest/Bootstrap.Admin/Api/RegisterTest.cs +++ b/UnitTest/Bootstrap.Admin/Api/RegisterTest.cs @@ -19,10 +19,9 @@ namespace Bootstrap.Admin.Api public async void Post_Ok() { // register new user - var nusr = new User() { UserName = "UnitTest-RegisterController", DisplayName = "UnitTest", Password = "1", Description = "UnitTest" }; + var nusr = new User() { UserName = "UnitTest_RegisterController", DisplayName = "UnitTest", Password = "1", Description = "UnitTest" }; var resp = await Client.PostAsJsonAsync(nusr); Assert.True(resp); - nusr.Delete(nusr.RetrieveNewUsers().Where(u => u.UserName == nusr.UserName).Select(u => u.Id)); } diff --git a/UnitTest/Bootstrap.Admin/Api/UsersTest.cs b/UnitTest/Bootstrap.Admin/Api/UsersTest.cs index 4fa39932..1666c559 100644 --- a/UnitTest/Bootstrap.Admin/Api/UsersTest.cs +++ b/UnitTest/Bootstrap.Admin/Api/UsersTest.cs @@ -36,7 +36,7 @@ namespace Bootstrap.Admin.Api var user = new User(); user.Delete(user.Retrieves().Where(usr => usr.UserName == "UnitTest-Delete").Select(usr => usr.Id)); - var nusr = new User { UserName = "UnitTest-Delete", Password = "1", DisplayName = "DisplayName", ApprovedBy = "System", ApprovedTime = DateTime.Now, Description = "Desc", Icon = "default.jpg" }; + var nusr = new User { UserName = "UnitTest_Delete", Password = "1", DisplayName = "DisplayName", ApprovedBy = "System", ApprovedTime = DateTime.Now, Description = "Desc", Icon = "default.jpg" }; var resp = await Client.PostAsJsonAsync("", nusr); Assert.True(resp); @@ -80,7 +80,7 @@ namespace Bootstrap.Admin.Api [Fact] public async void Put_Ok() { - var usr = new User { UserName = "UnitTest-Change", Password = "1", DisplayName = "DisplayName", ApprovedBy = "System", ApprovedTime = DateTime.Now, Description = "Desc", Icon = "default.jpg" }; + var usr = new User { UserName = "UnitTest_Change", Password = "1", DisplayName = "DisplayName", ApprovedBy = "System", ApprovedTime = DateTime.Now, Description = "Desc", Icon = "default.jpg" }; usr.Delete(usr.Retrieves().Where(u => u.UserName == usr.UserName).Select(u => u.Id)); Assert.True(usr.Save(usr)); @@ -97,7 +97,7 @@ namespace Bootstrap.Admin.Api // Login as new user var client = Host.CreateClient(); client.BaseAddress = new Uri("http://localhost/api/Users"); - await client.LoginAsync("UnitTest-Change", "1"); + await client.LoginAsync("UnitTest_Change", "1"); resp = await client.PutAsJsonAsync(usr); Assert.True(resp);