예제 #1
0
        public void ArrayFirst_ThirdApproach_Success_True()
        {
            int[] nums   = new int[] { 2, 2, 1 };
            var   number = new SingleNumber(nums);
            var   result = number.GetSingleNumber3();

            Assert.AreEqual(1, result);
        }
예제 #2
0
        public void ArraySecond_ThirdApproach_Success_True()
        {
            int[] nums   = new int[] { 4, 1, 2, 1, 2 };
            var   number = new SingleNumber(nums);
            var   result = number.GetSingleNumber3();

            Assert.AreEqual(4, result);
        }
예제 #3
0
        public void NullOrEmptyArray_ThirdApproach_Success_True()
        {
            int[] nums   = null;
            var   number = new SingleNumber(nums);
            var   result = number.GetSingleNumber3();

            Assert.AreEqual(0, result);
        }