예제 #1
0
        public void TestMethodDelete()
        {
            var context = new TestBankDBContext();
            var item    = GetSingleItem();

            context.Branches.Add(item);

            var controller = new BranchesController(context);
            var result     = controller.DeleteBranch(1) as OkNegotiatedContentResult <Branch>;

            Assert.IsNotNull(result);
            Assert.AreEqual(item.Id, result.Content.Id);
        }