public void Details_WithNotExistingId_ShouldReturnBadRequest()
        {
            // Arrange
            Mock <ITelescopeService>     telescopeService = new Mock <ITelescopeService>();
            TelescopeDetailsServiceModel detailsModel     = null;

            telescopeService
            .Setup(t => t.Details(It.IsAny <int>()))
            .Returns(detailsModel);

            TelescopesController telescopesController = new TelescopesController(telescopeService.Object);

            // Act
            IActionResult result = telescopesController.Details(1);

            // Assert
            Assert.IsType <BadRequestResult>(result);
        }
        public void Details_WithExistingId_ShouldReturnView()
        {
            // Arrange
            Mock <ITelescopeService>     telescopeService = new Mock <ITelescopeService>();
            TelescopeDetailsServiceModel detailsModel     = this.GetTelescopeDetailsServiceModel();

            telescopeService
            .Setup(t => t.Details(It.IsAny <int>()))
            .Returns(detailsModel);

            TelescopesController telescopesController = new TelescopesController(telescopeService.Object);

            // Act
            IActionResult result = telescopesController.Details(1);

            // Assert
            Assert.IsType <ViewResult>(result);
            object model = (result as ViewResult).Model;

            Assert.IsType <TelescopeDetailsServiceModel>(model);
            TelescopeDetailsServiceModel returnModel = model as TelescopeDetailsServiceModel;

            this.AssertTelescopeDetails(detailsModel, returnModel);
        }