public void entity_should_return_entity_not_found(MockDeleteEntities payload) { var response = this.callDeleteEntity(payload.dbId, payload.tableId, payload.entities); Assert.NotNull(response.Value); Assert.Contains(response.Value.message, $"Entity Pk {payload.entities[0]} not found"); }
public void entity_should_return_db_not_found(MockDeleteEntities payload) { var response = this.callDeleteEntity(payload.dbId, payload.tableId, payload.entities); Assert.NotNull(response.Value); Assert.Equal(response.Value.message, $"Database {payload.dbId} not found"); }
public void entity_should_return_reference_error(MockDeleteEntities payload) { var response = this.callDeleteEntity(payload.dbId, payload.tableId, payload.entities); Assert.NotNull(response.Value); Assert.Contains(response.Value.message, $"Table {payload.tableId} not found"); }
public void entity_should_delete(MockDeleteEntities payload) { var response = this.callDeleteEntity(payload.dbId, payload.tableId, payload.entities); Assert.NotNull(response.Value); JArray entities = JArray.Parse(JsonSerializer.Serialize(response.Value.content.entities ?? new List <dynamic>())); Assert.True(entities.Count == 0); Assert.Equal(response.Value.content.id, payload.tableId); }