public void InvalidPut() { // Arrange bool res = false; SQLiteServiceBase db = new SQLiteServiceBase(); Location obj = GetInvalidObject(); // Act try { int len = 0; if (db.GetLocations() != null) { foreach (var c in db.GetLocations()) { len++; } } if (len != 0) { db.Edit(len - 1, obj); } } catch (Exception) { res = true; } // Assert Assert.IsFalse(res); }
public void Put() { // Arrange bool res = true; SQLiteServiceBase db = new SQLiteServiceBase(); CustomerCompany obj = GetValidObject(); // Act try { int len = 0; if (db.GetCustomerCompanies() != null) { foreach (var c in db.GetCustomerCompanies()) { len++; } } if (len != 0) { db.Edit(len - 1, obj); } } catch (Exception) { res = false; } // Assert Assert.IsTrue(res); }
public void InvalidPost() { // Arrange bool res = false; SQLiteServiceBase db = new SQLiteServiceBase(); Location obj = GetValidObject(); // Act try { db.Add(obj); } catch (Exception) { res = true; } // Assert Assert.IsFalse(res); }
public void Post() { // Arrange bool res = true; SQLiteServiceBase db = new SQLiteServiceBase(); CustomerEmployee obj = GetValidObject(); // Act try { db.Add(obj); } catch (Exception) { res = false; } // Assert Assert.IsTrue(res); }