Skip to content

Commit

Permalink
Update testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
agile.zhou committed Jan 25, 2024
1 parent 757f622 commit 14e7429
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/ApiSiteTests/TestAppController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public async Task TestAdd()
Assert.IsInstanceOfType(result, typeof(JsonResult));
jr = result as JsonResult;
Assert.IsNotNull(jr.Value);
Assert.IsTrue(jr.Value.ToString().Contains("新建应用失败,请查看错误日志"));
Console.WriteLine(jr.Value.ToString());
Assert.IsTrue(jr.Value.ToString().Contains("success = False"));

appService.Setup(s => s.AddAsync(It.IsAny<App>())).ReturnsAsync(true);
appService.Setup(s => s.AddAsync(It.IsAny<App>(), It.IsAny<List<AppInheritanced>>())).ReturnsAsync(true);
Expand All @@ -69,7 +70,8 @@ public async Task TestAdd()
Assert.IsInstanceOfType(result, typeof(JsonResult));
jr = result as JsonResult;
Assert.IsNotNull(jr.Value);
Assert.IsFalse(jr.Value.ToString().Contains("新建应用失败,请查看错误日志"));
Console.WriteLine(jr.Value.ToString());
Assert.IsTrue(jr.Value.ToString().Contains("success = False"));
}
}
}

0 comments on commit 14e7429

Please sign in to comment.