Exemplo n.º 1
0
        public void DateCalculate_ShouldBeCorrect_When()
        {
            DateCalculate dateCalculate = new DateCalculate();

            dateCalculate.Currentdate = kernel.Get <IDateTime>();
            DateTime result = dateCalculate.Calculate5DayAhead();

            Assert.AreEqual(result, new DateTime(2018, 10, 7));
        }
Exemplo n.º 2
0
        public void Easytoo()
        {
            DateCalculate dateCalculate = new DateCalculate();

            dateCalculate.Currentdate = kernel.Get <IDateTime>();

            DateTime result = dateCalculate.Calculate5DayAhead();

            Assert.AreEqual(result, new DateTime(2018, 10, 6));
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            StandardKernel kernel = new StandardKernel();

            kernel.Bind <IDateTime>().To <DateTimeAlive>();

            Console.WriteLine("Welcome to the Date Calculator");
            DateCalculate dateCalculate = new DateCalculate();

            dateCalculate.Currentdate = kernel.Get <IDateTime>();

            DateTime calculatedDate = dateCalculate.Calculate5DayAhead();

            Console.WriteLine("Current Date: {0} - Calculated Date: {1}", kernel.Get <IDateTime>().Today, calculatedDate);
            Console.ReadLine();
        }