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

            releaseService.Setup(x => x.GetReleases()).Returns(new List <Release>());

            var controller = new ReleaseController(releaseService.Object);

            IHttpActionResult actionResult = controller.GetReleases();
            var contentResult = actionResult as OkNegotiatedContentResult <List <Release> >;

            Assert.IsNotNull(contentResult.Content);
        }