refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.
This commit is contained in:
25
Scripts/Core/EntityController_test.tmpl
Normal file
25
Scripts/Core/EntityController_test.tmpl
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
[Fact]
|
||||
public async Task Check_Get_entity_Controller()
|
||||
{
|
||||
Shared_Test_Config.Init_Webapi_Context();
|
||||
|
||||
try
|
||||
{
|
||||
int entityId = 1;
|
||||
_entity_Repository repository = new _entity_Repository();
|
||||
_entity_Controller controller = new _entity_Controller(repository);
|
||||
dynamic result = await controller.GetEntityAsync(entityId);
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal(StatusCodes.Status200OK, result.Result.StatusCode);
|
||||
|
||||
var entity = result.Result.Value;
|
||||
Assert.NotNull(entity);
|
||||
if (entityId > 0) Assert.Equal(entityId, entity._entity_Id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user