Beispiel #1
0
        public void TriangleFactory_DefineGenericTriangle_Failure()
        {
            var figure = new TriangleFactory();

            Assert.Null(figure.GetTriangle(1, 2, 3));
            Assert.Null(figure.GetTriangle(0, 2, 3));
            Assert.Null(figure.GetTriangle(1, -2, 3));
        }
Beispiel #2
0
        public void TriangleFactory_DefineRightTriangle_Success()
        {
            var figure = new TriangleFactory();

            Assert.True(figure.GetTriangle(1, 2, 2) is RightTriangle);
            Assert.True(figure.GetTriangle(2, 1, 2) is RightTriangle);
            Assert.True(figure.GetTriangle(2, 2, 1) is RightTriangle);
            Assert.True(figure.GetTriangle(2, 2, 2) is RightTriangle);
        }
Beispiel #3
0
        public void TriangleFactory_DefineGenericTriangle_Success()
        {
            var figure = new TriangleFactory();

            Assert.True(figure.GetTriangle(2, 3, 4) is GenericTriangle);
        }