示例#1
0
 /// <summary>
 /// Verifies the doesnt exist.
 /// </summary>
 private void VerifyDoesntExist()
 {
     if (GunSmiths.Exists(_databasePath, _gunSmithName, out _errOut))
     {
         long id    = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);
         bool value = GunSmiths.Delete(_databasePath, id, out _errOut);
     }
 }
示例#2
0
        public void EditTest()
        {
            VerifyExists();
            long id    = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);
            bool value = GunSmiths.Update(_databasePath, id, _gunSmithName, "222 here", "N/A", "myCity", "ky", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", true, out _errOut);

            General.HasTrueValue(value, _errOut);
        }
示例#3
0
        public void GetIdTest()
        {
            VerifyExists();
            long value = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);

            TestContext.WriteLine($"Id: {value}");
            General.HasTrueValue(value > 0, _errOut);
        }
示例#4
0
        public void DeleteTest()
        {
            VerifyExists();
            long id    = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);
            bool value = GunSmiths.Delete(_databasePath, id, out _errOut);

            General.HasTrueValue(value, _errOut);
        }
示例#5
0
        public void HasWorkOrdersnAttachedTest()
        {
            VerifyExists();
            long id    = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);
            int  value = GunSmiths.HasWorkOrdersnAttached(_databasePath, id, out _errOut);

            General.HasTrueValue(value == 0, _errOut);
        }
示例#6
0
        public void GetByIdTest()
        {
            VerifyExists();
            long id = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);
            List <GunSmithContacts> value = GunSmiths.Get(_databasePath, id, out _errOut);

            PrintList(value);
            General.HasTrueValue(value.Count > 0, _errOut);
        }
示例#7
0
        public void GetNameTest()
        {
            VerifyExists();
            long   id    = GunSmiths.GetId(_databasePath, _gunSmithName, out _errOut);
            string value = GunSmiths.GetName(_databasePath, id, out _errOut);

            TestContext.WriteLine($"Name: {value}");
            General.HasValue(value, _errOut);
        }