Beispiel #1
0
        public void ReturnCorrectString_WhenInputIsValid(int sideA, int sideB, int sideC, string expected)
        {
            //Arrange
            SUT.Triangle t = new SUT.Triangle();
            t.SideA = sideA;
            t.SideB = sideB;
            t.SideC = sideC;

            //Act
            string result = t.AnalyzeType();

            //Assert
            result.Should().Be(expected);
        }
Beispiel #2
0
        public void ReturnException_WhenInvalidValue(int sideA, int sideB, int sideC)
        {
            //Arrange
            SUT.Triangle t = new SUT.Triangle();
            t.SideA = sideA;
            t.SideB = sideB;
            t.SideC = sideC;

            //Act (well, actually more Arrange)
            Action test = () => { t.AnalyzeType(); };

            //Assert
            test.Should().Throw <SUT.InvalidSideException>();
        }