Ejemplo n.º 1
0
        public void GetFactorCount_5_Expect2()
        {
            // Arrange
            NumbersUtility numbersUtility = new NumbersUtility();

            // Act
            var result = numbersUtility.GetFactorCount(5);

            // Assert
            Assert.AreEqual(2, result);
        }
Ejemplo n.º 2
0
        public void GetFactorCount_NumberIsNegative_ExpectInvalidOperationException()
        {
            // Arrange
            NumbersUtility numbersUtility = new NumbersUtility();

            // Act
            Action action = () => numbersUtility.GetFactorCount(-1);

            // Assert
            Assert.ThrowsException <InvalidOperationException>(action);
        }