示例#1
0
        public void HappyPath(string inputString, int expectedOutput)
        {
            var test   = new ConvertToWholeNumber();
            var result = test.DoConversion(inputString);

            Assert.AreEqual(expectedOutput, result);
            Assert.IsInstanceOf <int>(result);
        }
示例#2
0
        public void InvalidStringInput(string inputString)
        {
            var test = new ConvertToWholeNumber();

            Assert.Throws <System.FormatException>(() => test.DoConversion(inputString));
        }