public async Task CreateEntityControllerTest() { var product = ProductMock.GetProduct(); using (var context = SetupDatabase(nameof(CreateEntityControllerTest))) { var businessController = new BusinessRulesControllerTest(context); context.AddController(businessController); context.Add(product); await context.SaveChangesAsync(); Assert.AreEqual("Create", product.ActionFlag); } }
public void SetUp() { _product = ProductMock.GetProduct(); }