public void CardDelete() { // Setup test params const string url = "/api/card/delete"; // Activate card for client var ro = TestSetup.Type == TestSetup.TestType.LiteDB ? AsyncHelper.RunSync(() => _controller.CardDelete(TestSetup.NewCard)) : TestSetup.GetData <string>(url, JsonConvert.SerializeObject(TestSetup.NewCard)); // Assert the result Assert.AreEqual(ro.ReturnCode, 0); // Check that the cards is actually deleted in the cardlist var card = GetCard(TestSetup.NewCard.RFID); Assert.IsNotNull(card); Assert.AreEqual(card.status, "D"); }