public async Task TestDeleteProductSuccess() { //Should update Collection by deleting a product from its list var result = await controller.AddProduct(1, 1); result = await controller.DeleteProduct(1, 1); Assert.IsType <OkObjectResult>(result); OkObjectResult new_res = (OkObjectResult)await controller.GetCollection(1); CollectionDTO new_dto = (CollectionDTO)new_res.Value; //Information inside the retrived CollectionDTO should be updated Assert.Equal("Test_Collection", new_dto.collectionName); Assert.Equal("Mock_Parameter", new_dto.aestheticParameter); Assert.True(1 == new_dto.CollectionId); Assert.True(0 == new_dto.products.Count); }