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")); } } }