public void Should_return_empty_result_when_root_path_is_empty()
        {
            // Given
            var extensions = new[] { "html" };
            A.CallTo(() => this.rootPathProvider.GetRootPath()).Returns(string.Empty);
            this.provider = new FileSystemViewLocationProvider(this.rootPathProvider, this.reader);

            // When
            var result = this.provider.GetLocatedViews(extensions);

            // Then
            result.ShouldHaveCount(0);
        }
        public FileSystemViewLocationProviderFixture()
        {
            this.reader = A.Fake<IFileSystemReader>();
            this.rootPathProvider = A.Fake<IRootPathProvider>();

            A.CallTo(() => this.rootPathProvider.GetRootPath()).Returns("rootPath");
            
            this.provider = new FileSystemViewLocationProvider(this.rootPathProvider, this.reader);

            this.locationResult = new Tuple<string, Func<StreamReader>>(
                Path.Combine("this", "is", "a", "fake", "view.html"),
                () => null);

            A.CallTo(() => this.reader.GetViewsWithSupportedExtensions(A<string>._, A<IEnumerable<string>>._)).Returns(new[] { this.locationResult });
        }
 public NSembleViewLocationProvider(IRootPathProvider rootPathProvider, IFileSystemReader fileSystemReader, global::Nancy.TinyIoc.TinyIoCContainer container)
 {
     _documentStore = container.Resolve<IDocumentStore>("DocStore");
     fsViewLocationProvider = new FileSystemViewLocationProvider(rootPathProvider, fileSystemReader);
     resourcesViewLocationProvider = new ResourceViewLocationProvider(new NSembleResourceReader(), new NSembleResourceAssemblyProvider());
 }