123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using REG_MARK_LIB;
- namespace UnitTestProject
- {
- [TestClass]
- public class UnitTest
- {
- [TestMethod]
- public void TestMethodCheckMarkIsTrue()
- {
- Assert.IsTrue(REG_MARK.CheckMark("a123aa456"), "true");
- }
- [TestMethod]
- public void TestMethodCheckMarkIsFalse()
- {
- Assert.IsFalse(REG_MARK.CheckMark("1234567"), "false");
- }
- [TestMethod]
- public void TestMethodCheckMarkIsInstanceOfType()
- {
- Assert.IsInstanceOfType(REG_MARK.CheckMark("1234567"), typeof(Boolean));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterIsEquals()
- {
- Assert.AreEqual("a124aa456", REG_MARK.GetNextMarkAfter("a123aa456"));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterIsInstanceOfType()
- {
- Assert.IsInstanceOfType(REG_MARK.GetNextMarkAfter("a123aa456"), typeof(String));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterIsNotEquals()
- {
- Assert.AreNotEqual("112235687", REG_MARK.GetNextMarkAfter("a123aa456"));
- }
-
-
- [TestMethod]
- public void TestMethodGetNextMarkAfterInRangeAreNotEqual()
- {
- Assert.AreNotEqual("112235687", REG_MARK.GetNextMarkAfterInRange("a123aa456", "a120aa456", "a130aa456"));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterInRangeAreEqual()
- {
- Assert.AreEqual("a124aa456", REG_MARK.GetNextMarkAfterInRange("a123aa456", "a120aa456", "a130aa456"));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterInRangeIsInstanceOfType()
- {
- Assert.IsInstanceOfType(REG_MARK.GetNextMarkAfterInRange("a123aa456", "a120aa456", "a130aa456"), typeof(String));
- }
- [TestMethod]
- public void TestMethodGetCombinationsCountInRangeIsInstanceOfType()
- {
- Assert.IsInstanceOfType(REG_MARK.GetCombinationsCountInRange("a123aa456", "a130aa456"), typeof(int));
- }
- [TestMethod]
- public void TestMethodGetCombinationsCountInRangeAreEqual()
- {
- Assert.AreEqual(7, REG_MARK.GetCombinationsCountInRange("a123aa456", "a130aa456"));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfter1()
- {
- Assert.AreEqual("s", REG_MARK.GetNextMarkAfter("z999zz999"));
- }
- [TestMethod]
- public void TestMethodCheckMark2()
- {
- Assert.AreEqual(false, REG_MARK.CheckMark("1234567"));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterInRange3()
- {
- Assert.AreEqual("s", REG_MARK.GetNextMarkAfterInRange("1234567", "1234567", "1234567"));
- }
- [TestMethod]
- public void TestMethodGetCombinationsCountInRange4()
- {
- Assert.AreEqual(0, REG_MARK.GetCombinationsCountInRange("z", "zds2"));
- }
- [TestMethod]
- public void TestMethodGetNextMarkAfterInRange5()
- {
- Assert.AreEqual("out of stock", REG_MARK.GetNextMarkAfterInRange("a123aa456", "a120aa456", "a110aa456"));
- }
- }
- }
|