Beispiel #1
0
        public void checkIfIsString()
        {
            RentBikeModel rent    = new RentBikeModel(3, 123, 1, "Hourly", (int)RentType.Hour);
            var           message = RentBikeHelper.CalculateTotals(rent);

            Assert.AreEqual(typeof(string), message.GetType());
        }
Beispiel #2
0
        public void isInserted()
        {
            DBConnector dBConnector = new DBConnector();

            dBConnector.CreateDB();
            RentBikeModel rent = new RentBikeModel(3, 123, 1, "Hourly", (int)RentType.Hour);

            dBConnector.InsertNewRent(rent);
            long totalRecords = dBConnector.GetTotalRecords();

            Assert.AreEqual(totalRecords > 1, totalRecords > 1);
        }
Beispiel #3
0
        public void IsFamily()
        {
            RentBikeModel rent = new RentBikeModel(3, 123, 1, "Hourly", (int)RentType.Hour);

            Assert.AreEqual(1, rent.getIsFamily());
        }
Beispiel #4
0
        public void isRent()
        {
            RentBikeModel rent = new RentBikeModel();

            Assert.AreEqual(typeof(RentBikeModel), rent);
        }