public UnitTest1() { Func <double[], double> areaSquare = (sides) => { return(sides[0] * sides[1]); }; Func <double[], bool> identitySquare = (sides) => { if (sides.Length != 2) { return(false); } if (sides[0] == sides[1]) { return(true); } return(false); }; AreaCalculation.AddFigure("Square", areaSquare, identitySquare); }
public void AddFigureInvalidAreaFunc() { AreaCalculation.AddFigure("Тест", null, null); }
public void AddFigureInvalidIdentify() { AreaCalculation.AddFigure("Тест2", (x) => { return(x[0]); }, null); }
public void AddFigureInvalidName() { AreaCalculation.AddFigure(null, null, null); }