Ejemplo n.º 1
0
        public void Case2()
        {
            // Arrange
            SingleNumberProblem obj = new SingleNumberProblem();

            int[] num      = new int[] { 4, 1, 2, 1, 2 };
            int   expected = 4;

            // Act
            int actual = obj.SingleNumber(num);

            // Assert
            Assert.Equal(expected, actual);
        }
        public void SingleNumberProblem()
        {
            var solution = new SingleNumberProblem();

            Assert.Equal(3, solution.SingleNumber(new int[] { 1, 2, 1, 2, 3 }));
        }