Example #1
0
        public void EqualitObjects()
        {
            StrShift example  = "Microsoft";
            String   example2 = "Microsoft2";

            Assert.IsFalse(example == example2);
        }
Example #2
0
        public void EqualitySameObjects()
        {
            StrShift example  = "Microsoft";
            StrShift example2 = "Microsoft";

            Assert.IsTrue(example == example2);
        }
Example #3
0
        public void RightShiftWithBigNumber()
        {
            StrShift example = "Microsoft";
            int      shift   = 11;

            var      actualResult   = example >> shift;
            StrShift expectedResult = "crosoftMi";

            Assert.AreEqual(expectedResult, actualResult);
        }
Example #4
0
        public void LeftShiftWithNegativeNumber()
        {
            StrShift example = "Microsoft";
            int      shift   = -2;

            var      actualResult   = example << shift;
            StrShift expectedResult = "crosoftMi";

            Assert.AreEqual(expectedResult, actualResult);
        }
Example #5
0
        public void LeftShiftWithZero()
        {
            StrShift example = "Microsoft";
            int      shift   = 0;

            var      actualResult   = example << shift;
            StrShift expectedResult = "Microsoft";

            Assert.AreEqual(expectedResult, actualResult);
        }
Example #6
0
        public void EqualityDifferentObjects()
        {
            StrShift example  = "Microsoft";
            StrShift example2 = "Microsoft2";

            Boolean actualResult = example == example2;


            Assert.IsFalse(actualResult);
        }
Example #7
0
        public void RightShiftWithSmallNumber()
        {
            int shift = 2;
            // arrange
            StrShift example      = "Microsoft";
            var      actualResult = example >> shift;

            StrShift expectedResult = "crosoftMi";


            Assert.AreEqual(expectedResult, actualResult);
        }
Example #8
0
 public void LeftShiftingNullObject()
 {
     StrShift example = null;
     var      result  = example << 3;
 }
Example #9
0
 public void RightShiftingNullObject()
 {
     StrShift example = null;
     var      result  = example >> 3;
 }