How to create a new test case method in Unit test project?
To create a new Test case method, create a new method in the Unit test class and decorate with [TestMethod].
TEST CLASS CODE
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace WebApplicationTest { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { } [TestMethod] public void CreateViewTest() { } } }
See the highlighted code that has a method with [TestMethod] attribute.
No comments:
Post a Comment