1234567891011121314151617181920212223242526272829303132333435 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using ClassLibrary1;
- namespace UnitTestProject1
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void TestMethod1()
- {
- int a = 5; int b = 6;
- int exp = 11;
- int c = a + b;
- Assert.AreEqual(exp, c);
- }
- [TestMethod]
- public void TestMethod2()
- {
- int exp = 7;
- int a = 3; int b = 4;
- int c = a + b;
- Assert.AreEqual(exp, c);
- }
- [TestMethod]
- public void TestMethod3()
- {
- int exp = 3;
- int a = 1; int b = 2;
- int c = a + b;
- Assert.AreEqual(exp, c);
- }
- }
- }
|