public void GetIdTest() { VerifyExists(); long id = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut); TestContext.WriteLine($"id: {id}"); General.HasTrueValue(id > 0, _errOut); }
public void DeleteTest() { VerifyExists(); long id = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut); bool value = MaintancePlans.Delete(_databasePath, id, out _errOut); General.HasTrueValue(value, _errOut); }
public void UpdateTest() { VerifyExists(); long id = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut); bool value = MaintancePlans.Update(_databasePath, id, _maintenancePlansName, $"UPDATED - {_maintenancePlansOperationDetails}", _maintenancePlansIntervalsInDays, _maintenancePlansIntervalInRoundsFired, _maintenancePlansNotes, out _errOut); General.HasTrueValue(value, _errOut); }
/// <summary> /// Verifies the doesnt exist. /// </summary> private void VerifyDoesntExist() { if (MaintancePlans.Exists(_databasePath, _maintenancePlansName, out _errOut)) { long value = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut); MaintancePlans.Delete(_databasePath, value, out _errOut); } }
public void ListByIdTest() { VerifyExists(); long id = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut); List <MaintancePlansList> value = MaintancePlans.Lists(_databasePath, id, out _errOut); PrintList(value); General.HasTrueValue(value.Count > 0, _errOut); }
public void GetNameTest() { VerifyExists(); long id = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut); string name = MaintancePlans.GetName(_databasePath, id, out _errOut); TestContext.WriteLine($"Name: {name}"); General.HasTrueValue(name.Length > 0, _errOut); }