Ejemplo n.º 1
0
        public void CardActivate()
        {
            // Setup test params
            string url = "/api/card/activate";

            // Activate card for client
            var ro = TestSetup.Type == TestSetup.TestType.LiteDB
                ? AsyncHelper.RunSync(() => _controller.CardActivate(TestSetup.NewCard))
                : TestSetup.GetData <string>(url, JsonConvert.SerializeObject(TestSetup.NewCard));

            // Assert the result
            Assert.AreEqual(ro.ReturnCode, 0);

            // Check that the cards is actually activated in the cardlist
            var card = GetCard(TestSetup.NewCard.RFID);

            Assert.IsNotNull(card);
            Assert.AreEqual(card.status, "A");
        }