Пример #1
0
 public async Task <ICreditCard> updateCreditCard(ICreditCard cc)
 {
     using (var conn = new SQLiteConnection(_connectionString))
     {
         conn.Open();
         var sqlstr = @"UPDATE Creditcard set created = " + cc.GetCreated() +
                      "lastused = " + cc.GetLastUsed() +
                      "pin = " + cc.GetPinCode() +
                      "wrongpincodeattemps = " + cc.GetWrongPinCodeAttemps() +
                      "account = " + cc.GetAccount().GetId() +
                      "blocked = " + cc.IsBlocked() +
                      "WHERE id = " + cc.GetId() + ";";
         var command = new SQLiteCommand(sqlstr, conn);
         await command.ExecuteNonQueryAsync();
     }
     return(cc);
 }
Пример #2
0
        public void isBlocked_empty_returnsFalse()
        {
            var actual = cc.IsBlocked(); // unfortunate that un-initiaized == false

            Assert.IsFalse(actual);
        }