public int GetServicesIdAndInsertDB(string servicesName) { Services services = new Services() { services_id = selectServices.GetNextTabletId(SGetIdFromSpecificTable.queryGetLatestServicesID()), services_name = servicesName }; return(insertServices.InsertObjectToDB(services)); }
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); }