Exemple #1
0
        public void UpdateRelease()
        {
            var releaseService = new Mock <IReleaseBusinessLayer>();

            releaseService.Setup(x => x.GetReleaseByID(1)).Returns(testrelease);

            var controller = new ReleaseController(releaseService.Object);

            IHttpActionResult actionResult = controller.UpdateRelease(1, testrelease);
            var contentResult = actionResult as OkNegotiatedContentResult <Release>;

            Assert.IsNotNull(contentResult.Content);
            Assert.AreEqual(1, contentResult.Content.ReleaseID);
        }