Ejemplo n.º 1
0
        public int GetServicesIdAndInsertDB(string servicesName)
        {
            Services services = new Services()
            {
                services_id   = selectServices.GetNextTabletId(SGetIdFromSpecificTable.queryGetLatestServicesID()),
                services_name = servicesName
            };

            return(insertServices.InsertObjectToDB(services));
        }
Ejemplo n.º 2
0
        public void ShouldAddNewServices_ReturnNewID()
        {
            SqlLiteDB.SqlLiteDBCreateTableIFNotExist();
            int      servicesID = selectServices.GetNextTabletId(SGetIdFromSpecificTable.queryGetLatestServicesID());
            Services services   = new Services()
            {
                services_id   = servicesID,
                services_name = "trwała"
            };
            int lastIndex = addServices.InsertObjectToDB(services);

            Assert.AreEqual(lastIndex, servicesID);
        }