1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using testirovanie;
- namespace TestProject1
- {
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void CheckMark_IsTrue()
- {
- Assert.IsTrue(REG_MARK_LIB.CheckMark("À999ÀÀ52"));
- }
- [TestMethod]
- public void CheckMark_IsFalse()
- {
- Assert.IsFalse(REG_MARK_LIB.CheckMark("À888ÁÀ52"));
- }
- [TestMethod]
- public void CheckMark_AreEquals_True()
- {
- Assert.AreEqual(REG_MARK_LIB.CheckMark("Â042ÅÊ77"), true);
- }
- [TestMethod]
- public void CheckMark_AreEquals_False()
- {
- Assert.AreEqual(REG_MARK_LIB.CheckMark("Á481ÊÅ77"), false);
- }
- [TestMethod]
- public void GetNextMarkAfter_NextMark_TypeIsString()
- {
- Assert.IsInstanceOfType(REG_MARK_LIB.GetNextMarkAfter("À421ÅÓ52"), typeof(string));
- }
- [TestMethod]
- public void GetNextMarkAfter_NextMark_IsNotNull()
- {
- Assert.IsNotNull(REG_MARK_LIB.GetNextMarkAfter("À941ÅÅ52"));
- }
- [TestMethod]
- public void GetCombinationsCountInRange_Count_TypeIsInt()
- {
- Assert.IsInstanceOfType(REG_MARK_LIB.GetCombinationsCountInRange("À001ÀÀ52", "À002ÀÁ52"), typeof(int));
- }
- [TestMethod]
- public void GetCombinationsCountInRange_Count_AreEquals()
- {
- Assert.AreEqual(REG_MARK_LIB.GetCombinationsCountInRange("À001ÀÀ52", "À001ÀÁ"), 1000);
- }
- [TestMethod]
- public void GetNextMarkAfter_NextMark_AreEquals()
- {
- Assert.AreEqual(REG_MARK_LIB.GetNextMarkAfter("À001ÓÓ52"), "À002ÓÓ52");
- }
- [TestMethod]
- public void GetNextMarkAfter_NextMark_AreNotEqual()
- {
- Assert.AreNotEqual(REG_MARK_LIB.GetNextMarkAfter("À001ÓÓ52"), "À003ÓÓ52");
- }
- [TestMethod]
- public void HardMethod_GetNextMarkAfterInRange_NextMark_AreEqual()
- {
- Assert.AreEqual(REG_MARK_LIB.GetNextMarkAfterInRange("À003ÀÀ52", "À001ÀÀ52", "À005ÀÀ52"), "À004ÀÀ52");
- }
- }
- }
|