public void FileWorker_Add_Get_FlagTrue() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(2, true); IIG.FileWorker.BaseFileWorker.Write(mbf.GetFlag().ToString(), @"C:\Users\user\Desktop\Навчання\4 курс\7 семестр\КПІ-3\l4\l4\UnitTestL4\TextFile.txt"); string expected = mbf.GetFlag().ToString(); string actual = IIG.FileWorker.BaseFileWorker.ReadAll(@"C:\Users\user\Desktop\Навчання\4 курс\7 семестр\КПІ-3\l4\l4\UnitTestL4\TextFile.txt"); Assert.AreEqual(expected, actual); }
public void Test_CheckGetFlagMethod_False_Case3() // set zero index value true { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(3, false); multiple_flag_obj.SetFlag(0); Assert.False(multiple_flag_obj.GetFlag()); }
public void TestConstructorTrue() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(2); bool actual = mbf.GetFlag(); Assert.True(actual); }
public void GetFlag_999positionFalse_falseReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, true); mbf.ResetFlag(999); Assert.AreEqual(false, mbf.GetFlag()); }
public void GetFlag_0positionTrue_falseReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, false); mbf.SetFlag(0); Assert.AreEqual(false, mbf.GetFlag()); }
public void GetFlag_01_falseReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(2, false); mbf.SetFlag(1); Assert.AreEqual(false, mbf.GetFlag()); }
public void Test_CheckSetValue_True() // all flags were true and after SetFlag metod stay true. { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(2, true); multiple_flag_obj.SetFlag(0); multiple_flag_obj.SetFlag(1); Assert.True(multiple_flag_obj.GetFlag()); }
public void ConstructorExceedMaxLength() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(9999999999999999999, false); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void ConstructorNormalRun() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(2, false); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void SetFlag_1_999_trueReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(999, false); for (ulong i = 0; i < 999; i++) { mbf.SetFlag(i); } Assert.AreEqual(true, mbf.GetFlag()); }
public void ResetFlag_10_99_falseReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(99, true); for (ulong i = 9; i < 99; i++) { mbf.ResetFlag(i); } Assert.AreEqual(false, mbf.GetFlag()); }
public void ResetFlagExceedsLength() { bool expected = true; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(3, false); mbf.ResetFlag(999999); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void GetFlagReturnsFalse() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(2, false); mbf.SetFlag(1); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void Despose() { bool expected = true; IIG.BinaryFlag.MultipleBinaryFlag mbf1 = new IIG.BinaryFlag.MultipleBinaryFlag(2, true); mbf1.Dispose(); bool actual = mbf1.GetFlag(); Assert.NotEqual(expected, actual); }
public void CheckOnlyOneSetFlagOnWholeLength() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, false); mbf.SetFlag(0); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void OneResetFlagReturnToAllFlagsFalse() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, true); mbf.ResetFlag(999); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void GetFlagWithOnlyOneSetFlagReturnFalse() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, false); mbf.SetFlag(300); bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void TestResetFlagReturnFalse() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(20, true); for (ulong i = 0; i < 20; i++) { mbf.ResetFlag(i); } bool actual = mbf.GetFlag(); Assert.False(actual); }
public void TestSetFlagReturnTrue() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(20, false); for (ulong i = 0; i < 20; i++) { mbf.SetFlag(i); } bool actual = mbf.GetFlag(); Assert.True(actual); }
public void GetFlag_0positionFalse_falseReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, false); for (ulong i = 1; i < 1000; i++) { mbf.SetFlag(i); } Assert.AreEqual(false, mbf.GetFlag()); }
public void ResetFlagReturnsFalse() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(100, false); for (ulong i = 0; i < 100; i++) { mbf.ResetFlag(i); } bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void GetFlagRerunsFalseFromStart() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(1000, false); for (ulong i = 1; i < 1000; i++) { mbf.SetFlag(i); } bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void SetFlagExceedsLength() { bool expected = false; IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(99, false); for (ulong i = 10; i < 999; i++) { mbf.SetFlag(i); } bool actual = mbf.GetFlag(); Assert.Equal(expected, actual); }
public void Test_CheckGetFlagMethod_False_Case1() { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(2, false); Assert.False(multiple_flag_obj.GetFlag()); }
public void Constructor_ulongMaxLength_falseReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(4294967295, false); Assert.AreEqual(false, mbf.GetFlag()); }
public void Test_CheckResetMethod_False() { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(2, true); multiple_flag_obj.ResetFlag(0); Assert.False(multiple_flag_obj.GetFlag()); }
public void Test_CheckToStringMethod_False() { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(2, false); Assert.Equal("False", multiple_flag_obj.GetFlag().ToString()); }
public void GetFlag_trueReturned() { IIG.BinaryFlag.MultipleBinaryFlag mbf = new IIG.BinaryFlag.MultipleBinaryFlag(2, true); Assert.AreEqual(true, mbf.GetFlag()); }
public void Test_CheckGetFlagMethod_True() { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(2, true); Assert.True(multiple_flag_obj.GetFlag()); }
public void Test_CheckSetValue_False_Case2() { IIG.BinaryFlag.MultipleBinaryFlag multiple_flag_obj = new IIG.BinaryFlag.MultipleBinaryFlag(2, false); multiple_flag_obj.SetFlag(0); Assert.False(multiple_flag_obj.GetFlag()); }