12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using ClassLibrary2;
- namespace UnitTestProject1
- {
- [TestClass]
- public class UnitTest1
- {
- Class1 class1 = new Class1();
- [TestMethod]
- public void TestMethod1()
- {
- int exp = 0;
- var ans = class1.sale(1, 600);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod2()
- {
- int exp = 5;
- var ans = class1.sale(3, 400);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod3()
- {
- int exp = 6;
- var ans = class1.sale(3, 600);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod4()
- {
- int exp = 11;
- var ans = class1.sale(5, 600);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod5()
- {
- int exp = 12;
- var ans = class1.sale(6, 1200);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod6()
- {
- int exp = 10;
- var ans = class1.sale(5, 300);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod7()
- {
- int exp = 16;
- var ans = class1.sale(11, 600);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod8()
- {
- int exp = 17;
- var ans = class1.sale(15, 1200);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod9()
- {
- int exp = 0;
- var ans = class1.sale(1, 200);
- Assert.AreEqual(exp, ans);
- }
- [TestMethod]
- public void TestMethod10()
- {
- int exp = 19;
- var ans = class1.sale(15, 2000);
- Assert.AreEqual(exp, ans);
- }
- }
- }
|