Hi,
I created an Azure Cloud Service project and selected "unit tests" as part of the options. It created me a default ValuesController
which has a Get method that accepts a integer parameter. It also created me a GetById test method with the attribute [TestMethod]. The test method for Get only checks for the value 5 and asserts if the expected result equals "value".
How do I simulate different combinations of data inputs to this method using a data driven unit test approach in Azure Cloud Service. Is there something that is available as an extension to the unit tests framework? Any other alternatives / suggestions would be appreciated.
// GET api/values/5 public string Get(int id) { return "value"; }
[TestMethod]public void GetById() { // Arrange ValuesController controller = new ValuesController(); // Act string result = controller.Get(5); // Assert Assert.AreEqual("value", result); }