コード例 #1
0
        public void IsOdd_ShouldReturnFalse_WhenNumberIsNotDivisibleByTwo()
        {
            bool isOdd = ParityService.IsOdd(1);

            Assert.That(isOdd, Is.False);
        }
コード例 #2
0
        public void IsOdd_ShouldReturnTrue_WhenNumberIsDivisibleByTwo()
        {
            bool isOdd = ParityService.IsOdd(2);

            Assert.That(isOdd, Is.True);
        }
コード例 #3
0
        public void IsEven_ShouldReturnFalse_WhenNumberIsEven(int number)
        {
            bool isEven = ParityService.IsOdd(number);

            Assert.That(isEven, Is.False);
        }