Beispiel #1
0
        public void CheckIfAvailableNotTrueTest()
        {
            PayParking pp    = new PayParking();
            bool       check = pp.CheckIfAvailable("12");

            Assert.AreEqual(check, false);
        }
Beispiel #2
0
        public void CheckIfAvailableTest()
        {
            PayParking pp    = new PayParking();
            bool       check = pp.CheckIfAvailable("1");

            Assert.AreEqual(check, true);
        }
Beispiel #3
0
        public void CheckScanTest()
        {
            PayParking pp = new PayParking();
            string     licencePlateText   = pp.Scan();
            string     expectedTextFormat = "Licence plate " + licencePlateText + " registered.";

            Assert.AreEqual(expectedTextFormat.Length, 33);
        }
Beispiel #4
0
        public void DisplaySpacesTest()
        {
            PayParking pp           = new PayParking();
            string     expectedtext = "Current parking status:\n |1|  |2|  |3|  |4|  |5|  |6|  |7|  |8|  |9|  |10| ";

            string result = pp.DisplaySpaces();

            Assert.AreEqual(expectedtext, result);
        }
Beispiel #5
0
        public void CheckRandomStringLengthTest()
        {
            string licencePlate = PayParking.RandomString();

            Assert.AreEqual(licencePlate.Length, 7);
        }