public void Details_PermissionsGranted_FullAccess()
        {
            // Arrange
            var serviceMock = GetFinanceServiceMock(true);
            _controller = new ContentController(_unitOfWork, _fileStorageManager, serviceMock.Object);
            _controller.ControllerContext = CreateControllerContext();

            // Act
            var result = _controller.Details(1);

            // Assert
            var model = (DetailsViewModel) result.Model;
            model.IsFullAccessGranted.Should().BeTrue();
        }
        public void Details_Simple_PropertiesInitialized()
        {
            // Arrange
            var serviceMock = GetFinanceServiceMock();
            _controller = new ContentController(_unitOfWork, _fileStorageManager, serviceMock.Object);
            _controller.ControllerContext = CreateControllerContext();

            // Act
            var result = _controller.Details(1);

            // Assert
            var model = (DetailsViewModel) result.Model;
            model.Properties.Should().HaveCount(2);
        }
        public void Details_Simple_PackageInitialized()
        {
            // Arrange
            var package = _unitOfWork.GetRepository<ContentPackage>().Get().Last();
            var serviceMock = GetFinanceServiceMock();
            _controller = new ContentController(_unitOfWork, _fileStorageManager, serviceMock.Object);
            _controller.ControllerContext = CreateControllerContext();

            // Act
            var result = _controller.Details(package.ID);

            // Assert
            var model = (DetailsViewModel) result.Model;
            model.Package.Should().Be(package);
        }