public void TestPersonalTaxAddItem() { //Arrange var PersonalTaxesDataMock = new Mock <IDataRepository <PersonalTax> >(); var TaxLogicMock = new Mock <ICalculate>(); var PersonalTaxController = new PersonalTaxController(PersonalTaxesDataMock.Object, TaxLogicMock.Object); //Act var result = PersonalTaxController.Post(new PersonalTax()); //Assert Assert.IsAssignableFrom <CreatedAtRouteResult>(result); }
public void TestPersonalTaxUpdateItem() { //Arrange var PersonalTaxesDataMock = new Mock <IDataRepository <PersonalTax> >(); var TaxLogicMock = new Mock <ICalculate>(); var PersonalTaxController = new PersonalTaxController(PersonalTaxesDataMock.Object, TaxLogicMock.Object); //Act var result = PersonalTaxController.Put(1, new PersonalTax()); //Assert Assert.IsAssignableFrom <NotFoundObjectResult>(result); }
public void TestPersonalTaxGetAllItems() { //Arrange var PersonalTaxesDataMock = new Mock <IDataRepository <PersonalTax> >(); var TaxLogicMock = new Mock <ICalculate>(); var PersonalTaxController = new PersonalTaxController(PersonalTaxesDataMock.Object, TaxLogicMock.Object); //Act var result = PersonalTaxController.Get(); //Assert Assert.IsAssignableFrom <OkObjectResult>(result); }