コード例 #1
0
        public void CallErrorWhereTriangleIsNotTriangleTest(params double[] sides)
        {
            Exception exception = Assert.Throws <Exception>(() => TriangleTypeChecker.CheckTriangleType(sides));

            Assert.Equal("The triangle does not exist", exception.Message);
        }
コード例 #2
0
        public void CallArrayNegativeNumberErrorTest(params double[] sides)
        {
            var exception = Assert.Throws <ArgumentException>(() => TriangleTypeChecker.CheckTriangleType(sides));

            Assert.Equal("Parties cannot be negative", exception.Message);
        }
コード例 #3
0
 public void SquarenessTest(params double[] sides)
 {
     Assert.Equal((TriangleTypeChecker.TriangleType) 2, TriangleTypeChecker.CheckTriangleType(sides));
 }
コード例 #4
0
        public void CallArrayLengthErrorTest(params double[] sides)
        {
            var exception = Assert.Throws <ArgumentException>(() => TriangleTypeChecker.CheckTriangleType(sides));

            Assert.Equal("The number of sides is not 3", exception.Message);
        }
コード例 #5
0
 public void AcuteAngledTest(params double[] sides)
 {
     Assert.Equal((TriangleTypeChecker.TriangleType) 0, TriangleTypeChecker.CheckTriangleType(sides));
 }