From 0f24398ac2de72dda418d0177b93978bafca1434 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 22 Dec 2022 17:47:07 +0800 Subject: Develop secret api. v58 --- .../CrupestApi.Commons.Tests/Crud/CrudServiceTest.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/CrudServiceTest.cs') diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/CrudServiceTest.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/CrudServiceTest.cs index a515d2f..284dbe2 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/CrudServiceTest.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons.Tests/Crud/CrudServiceTest.cs @@ -64,5 +64,13 @@ public class CrudServiceTest Assert.Equal(0, count); } - + [Fact] + public void EntityNotExistTest() + { + Assert.Throws(() => _crudService.GetByKey("KeyNotExist")); + Assert.Throws(() => _crudService.UpdateByKey("KeyNotExist", new TestEntity + { + Name = "crupest" + })); + } } -- cgit v1.2.3