Пример #1
0
        public SparkViewEngine(ITemplateFinderCollection templateFinderCollection, IDescriptorBuilder descriptorBuilder, ISparkViewEngine engine, 
            IFilterViewsCollection filterViewsCollection, IResolveDependencies resolveDependencies)
        {
            templateFinderCollection.ArgumentNullCheck("templateFinderCollection");
            descriptorBuilder.ArgumentNullCheck("descriptorBuilder");
            engine.ArgumentNullCheck("engine");
            filterViewsCollection.ArgumentNullCheck("filterViewsCollection");
            resolveDependencies.ArgumentNullCheck("resolveDependencies");

            this.templateFinderCollection = templateFinderCollection;
            this.descriptorBuilder = descriptorBuilder;
            this.engine = engine;
            this.filterViewsCollection = filterViewsCollection;
            this.resolveDependencies = resolveDependencies;
        }
Пример #2
0
        public void SetUp()
        {
            templateFinderCollection = A.Fake<ITemplateFinderCollection>();
            descriptorBuilder = A.Fake<IDescriptorBuilder>();
            sparkViewEngine = A.Fake<ISparkViewEngine>();
            filterViewsCollection = A.Fake<IFilterViewsCollection>();
            resolveDependencies = A.Fake<IResolveDependencies>();
            endpoint = A.Fake<IEndpoint>();
            endpointMethodInfo = new DynamicMethod("Test", typeof(string), new Type[0]);

            A.CallTo(() => endpoint.Method).Returns(endpointMethodInfo);

            viewEngine = new SparkViewEngine(templateFinderCollection, descriptorBuilder, sparkViewEngine, filterViewsCollection, resolveDependencies);
        }