public void GetById() { // 排列 ValuesController controller = new ValuesController(); // 操作 string result = controller.Get(5); // 断言 Assert.AreEqual("value", result); }
public void GetById() { // Arrange ValuesController controller = new ValuesController(); // Act string result = controller.Get(5); // Assert Assert.AreEqual("value", result); }
public void GetById() { // Anordnen ValuesController controller = new ValuesController(); // Aktion ausführen string result = controller.Get(5); // Bestätigen Assert.AreEqual("value", result); }
public void Get() { // 排列 ValuesController controller = new ValuesController(); // 操作 IEnumerable<string> result = controller.Get(); // 断言 Assert.IsNotNull(result); Assert.AreEqual(2, result.Count()); Assert.AreEqual("value1", result.ElementAt(0)); Assert.AreEqual("value2", result.ElementAt(1)); }
public void Get() { // Arrange ValuesController controller = new ValuesController(); // Act IQueryable<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)); }
public void Get() { // Anordnen ValuesController controller = new ValuesController(); // Aktion ausführen IEnumerable<string> result = controller.Get(); // Bestätigen Assert.IsNotNull(result); Assert.AreEqual(2, result.Count()); Assert.AreEqual("value1", result.ElementAt(0)); Assert.AreEqual("value2", result.ElementAt(1)); }