Exemple #1
0
        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");
        }
Exemple #2
0
        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");
        }
Exemple #3
0
        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");
        }
Exemple #4
0
        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);
        }