Пример #1
0
        public void IsEvenMethod_EvenNubers_ReturnTrue()
        {
            var service = new OddNumbersService();

            var result = service.IsEven(4);

            Assert.True(result);
        }
Пример #2
0
        public void IsOddMethod_OddNubers_ReturnFalse()
        {
            var service = new OddNumbersService();

            var result = service.IsOdd(4);

            Assert.False(result);
        }
Пример #3
0
        //[InlineData(2)]
        public void IsOddMethod_EvenNubers_ReturnFalse(int number)
        {
            // * naming: TestedUnit_Conditions_ExpectedResult
            // Arrange: Describe the phase where we initialize everything need in test
            var service = new OddNumbersService();

            // Act: Call the part need to be tested
            var result = service.IsEven(number);

            // Assert: Check the result
            Assert.False(result);
        }