예제 #1
0
        public void EqualsOnSameRefReturnsTrue()
        {
            bool expected = true;

            IIG.BinaryFlag.MultipleBinaryFlag mbf1 = new IIG.BinaryFlag.MultipleBinaryFlag(2, true);
            IIG.BinaryFlag.MultipleBinaryFlag mbf2 = mbf1;

            bool actual = mbf1.Equals(mbf2);

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void CheckSameWithEqualsOnSameReturnsTrue()
        {
            bool expected = true;

            IIG.BinaryFlag.MultipleBinaryFlag mbf1 = new IIG.BinaryFlag.MultipleBinaryFlag(5, false);
            IIG.BinaryFlag.MultipleBinaryFlag mbf2 = new IIG.BinaryFlag.MultipleBinaryFlag(5, false);

            bool actual = mbf1.Equals(mbf2);

            Assert.Equal(expected, actual);
        }
예제 #3
0
        public void EqualsOnEqualObjectReturnsTrue()
        {
            bool expected = true;

            IIG.BinaryFlag.MultipleBinaryFlag mbf1 = new IIG.BinaryFlag.MultipleBinaryFlag(500000, true);
            IIG.BinaryFlag.MultipleBinaryFlag mbf2 = new IIG.BinaryFlag.MultipleBinaryFlag(500000, true);

            bool actual = mbf1.Equals(mbf2);

            Assert.Equal(expected, actual);
        }
예제 #4
0
        public void CheckForEqualityAlmostSameBigger()
        {
            bool expected = false;

            IIG.BinaryFlag.MultipleBinaryFlag mbf1 = new IIG.BinaryFlag.MultipleBinaryFlag(50000, false);
            IIG.BinaryFlag.MultipleBinaryFlag mbf2 = new IIG.BinaryFlag.MultipleBinaryFlag(50000, false);
            mbf1.SetFlag(1489);

            bool actual = mbf1.Equals(mbf2);

            Assert.Equal(expected, actual);
        }