1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using Dll;
- namespace UnitTestForDLL
- {
- public class UnitTest1
- {
- #region Íèçêîé ñëîæíîñòè
- [Fact]
- public void CheckMarkOnTrue()
- {
- Assert.True(Class1.CheckMark("T386TB152"));
- }
- [Fact]
- public void CheckMarkOnFalse()
- {
- Assert.False(Class1.CheckMark("T386TB352"));
- }
- [Fact]
- public void CheckMarkOnNull()
- {
- Assert.NotNull(Class1.CheckMark("T386TB777"));
- }
- [Fact]
- public void CheckRegionsCollection()
- {
- Assert.NotEmpty(Class1.regions);
- }
- [Fact]
- public void CheckNextMark()
- {
- Assert.IsType<string>(Class1.GetNextMarkAfter("C151EY052"));
- }
- [Fact]
- public void CheckMark()
- {
- Assert.Equal(true, Class1.CheckMark("C151EY052"));
- }
- [Fact]
- public void CheckNextMarkAfter()
- {
- Assert.Equal("C153EY052", Class1.GetNextMarkAfter("C152EY052"));
- }
- [Fact]
- public void CheckNextMarkInRange()
- {
- Assert.IsType<string>(Class1.GetNextMarkAfterInRange("C324EY052", "C151EY052", "C767EY052"));
- }
- [Fact]
- public void CheckCountCombination()
- {
- Assert.Equal(3, Class1.GetCombinationsCountInRange("T101TB052", "T103TB052"));
- }
- [Fact]
- public void CheckNextMarkAfterInRangeEqual()
- {
- Assert.Equal("C153EY052", Class1.GetNextMarkAfterInRange("C152EY052", "C151EY052", "C153EY052"));
- }
- #endregion
- #region Âûñîêîé ñëîæíîñòè
- [Fact]
- public void NullArgumentOnCheck()
- {
- Assert.Throws<ArgumentException>(() => Class1.CheckMark(null));
- }
- [Fact]
- public void NullArgumentOnNext()
- {
- Assert.Throws<ArgumentException>(() => Class1.GetNextMarkAfter(null));
- }
- [Fact]
- public void NullArgumentOnRange()
- {
- Assert.Throws<ArgumentException>(() => Class1.GetNextMarkAfterInRange(null,null,null));
- }
- [Fact]
- public void NullArgumentOnCount()
- {
- Assert.Throws<ArgumentException>(() => Class1.GetCombinationsCountInRange(null,null));
- }
- [Fact]
- public void WrongArgumentOnCheck()
- {
- Assert.Throws<ArgumentException>(() => Class1.CheckMark("C6378TX6712"));
- }
- #endregion
- }
- }
|