Example #1
0
        static void Main(string[] args)
        {
            SquareCalculator calc = new SquareCalculator();
            InputCoordinates prog = new InputCoordinates();

            string path = @"C:\Users\guzhvad\Downloads\Guzhva\C Sharp\Log.txt";

            List <IStorage> storages = new List <IStorage>()
            {
                new ConsoleStorage(),
                new FileStorage(path)
            };
            Logger logger = new Logger(storages);

            logger.LogLevel = Models.LogLevel.Info;

            prog.InputCoordinate(logger);
            calc.CalculateLandSquare(prog.GetPoints(), logger);

            Console.ReadLine();
        }
 public void KvadrTest(double first, double expected)
 {
     IOneArgumentsCalculator calculator = new SquareCalculator();
     double result = calculator.Calculator(first);
     Assert.AreEqual(expected, result, 0.0001);
 }