Ejemplo n.º 1
0
 public FileSystemTemplateFinder(IFileScanner fileScanner, IRootPathProvider rootPathProvider, IFindModelFromViewCollection findModelFromViewCollection)
 {
     this.fileScanner = fileScanner;
     this.rootPathProvider = rootPathProvider;
     this.findModelFromViewCollection = findModelFromViewCollection;
     requestConfig = new CompositeAction<ScanRequest>();
 }
Ejemplo n.º 2
0
        public void SetUp()
        {
            applicationEndpoints = A.Fake<IApplicationEndpoints>();
            findModelFromViewCollection = A.Fake<IFindModelFromViewCollection>();

            templateFinder = new EmbeddedTemplateFinder(applicationEndpoints, findModelFromViewCollection);

            A.CallTo(() => applicationEndpoints.GetAssemblies()).Returns(new List<Assembly> { GetType().Assembly });
            A.CallTo(() => findModelFromViewCollection.FindModelType(A<TextReader>.Ignored, A<string>.Ignored)).Returns(typeof(object));
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            fileScanner = new FileScanner(new FileSystem(new DefaultJsonParser()));
            rootPathProvider = A.Fake<IRootPathProvider>();
            findModelFromViewCollection = A.Fake<IFindModelFromViewCollection>();

            templateFinder = new FileSystemTemplateFinder(fileScanner, rootPathProvider, findModelFromViewCollection);

            A.CallTo(() => rootPathProvider.GetRoot()).Returns(GetRootPath());
        }
Ejemplo n.º 4
0
 public EmbeddedTemplateFinder(IApplicationEndpoints applicationEndpoints, IFindModelFromViewCollection findModelFromViewCollection)
 {
     this.applicationEndpoints = applicationEndpoints;
     this.findModelFromViewCollection = findModelFromViewCollection;
 }