Exemplo n.º 1
0
        public void TestHasCarPermission()
        {
            using (var sw = new StringWriter())
            {
                Console.SetOut(sw);
                PicoPlacaApp.Form1 picoPlaca = new PicoPlacaApp.Form1();

                string licensePlateNumber = "AAC-O123";
                string date = "19/04/2019";
                string time = "18:17";
                picoPlaca.CheckPermission(licensePlateNumber, date, time);

                var result = sw.ToString().Trim();
                Assert.AreEqual(ExpectedPermission, result);
            }
        }
Exemplo n.º 2
0
        public void TestCarIsAtPicoTimeMorning()
        {
            using (var sw = new StringWriter())
            {
                Console.SetOut(sw);

                PicoPlacaApp.Form1 picoPlaca = new PicoPlacaApp.Form1();

                string licensePlateNumber = "MCB-250";
                string date = "19/04/2019";
                string time = "07:17";

                picoPlaca.CheckPermission(licensePlateNumber, date, time);

                var result = sw.ToString().Trim();
                Assert.AreEqual(ExpectedNoPermission, result);
            }
        }