public void TestMethodGetSave() { var controller = new BranchesController(new TestBankDBContext()); var item = GetSingleItem(); var result = controller.PostBranch(item) as CreatedAtRouteNegotiatedContentResult <Branch>; Assert.IsNotNull(result); Assert.AreEqual(result.RouteName, "DefaultApi"); Assert.AreEqual(result.RouteValues["id"], result.Content.Id); Assert.AreEqual(result.Content.Name, item.Name); }