public void Delete() { // Arrange Discounts.Controllers.ApiController controller = new Discounts.Controllers.ApiController(); // Act controller.Delete(5); // Assert }
public void Put() { // Arrange Discounts.Controllers.ApiController controller = new Discounts.Controllers.ApiController(); // Act controller.Put(5, "value"); // Assert }
public void GetById() { // Arrange Discounts.Controllers.ApiController controller = new Discounts.Controllers.ApiController(); // Act string result = controller.Get(5); // Assert Assert.AreEqual("value", result); }
public void Get() { // Arrange Discounts.Controllers.ApiController controller = new Discounts.Controllers.ApiController(); // Act IEnumerable <string> result = controller.Get(); // Assert Assert.IsNotNull(result); Assert.AreEqual(2, result.Count()); Assert.AreEqual("value1", result.ElementAt(0)); Assert.AreEqual("value2", result.ElementAt(1)); }