Example #1
0
        public void NewFigure_3Param_Triangle()
        {
            var figure = FlatFigureFabric.CreateFigure(5, 4, 8);

            Assert.IsInstanceOf <Triangle>(figure);
        }
Example #2
0
 public void NewFigure_Null_Exception()
 {
     Assert.Throws <ArgumentNullException>(() => FlatFigureFabric.CreateFigure(null));
 }
Example #3
0
        public void NewFigure_1Param_Circle()
        {
            var figure = FlatFigureFabric.CreateFigure(5);

            Assert.IsInstanceOf <Circle>(figure);
        }
Example #4
0
        public void NewFigure_WrongParam_Exception(int size)
        {
            var arr = new double[size];

            Assert.Throws <ArgumentException>(() => FlatFigureFabric.CreateFigure(arr));
        }