コード例 #1
0
        public void GetIdTest()
        {
            VerifyExists();
            long id = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut);

            TestContext.WriteLine($"id: {id}");
            General.HasTrueValue(id > 0, _errOut);
        }
コード例 #2
0
        public void DeleteTest()
        {
            VerifyExists();
            long id    = MaintancePlans.GetId(_databasePath, _maintenancePlansName, out _errOut);
            bool value = MaintancePlans.Delete(_databasePath, id, out _errOut);

            General.HasTrueValue(value, _errOut);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 /// <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);
     }
 }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }