Exemple #1
0
        public async Task PartService_ShouldDeleteCorrectlyPart()
        {
            //Arrange
            var db = DatabaseInitializer.GetDbForPartService();

            var service = new PartService(db);

            //Act
            await service.Delete(1);

            //Assert
            db.Parts.Should().HaveCount(1);
        }
Exemple #2
0
 public async Task <IActionResult> Delete(int id)
 {
     return(Ok(partService.Delete(id)));
 }