示例#1
0
        protected override void beforeEach()
        {
            _template1        = new Template("tmpl1.spark", "x", "o1");
            _template2        = new Template("tmpl2.spark", "z", "o2");
            _templateRegistry = new TemplateRegistry <ITemplate>(new[] { _template1, _template2 });

            var parsingRegistrations = MockFor <IParsingRegistrations <ITemplate> >();

            parsingRegistrations.Stub(x => x.ParsingFor(Arg <Template> .Is.Anything)).Return(new Parsing());

            Services.Inject(_types);
            configurePolicies();
            configureBinders();

            registerBindersAndPolicies();

            OtherTemplateBinder.Reset();
            OtherTemplatePolicy.Reset();
        }
示例#2
0
        protected override void beforeEach()
        {
            _template1 = new Template("tmpl1.spark", "x", "o1");
            _template2 = new Template("tmpl2.spark", "z", "o2");

            var chunkLoader = MockFor <IChunkLoader>();

            chunkLoader.Stub(x => x.Load(Arg <Template> .Is.Anything)).Return(Enumerable.Empty <Chunk>());

            Services.Inject <ITemplateRegistry>(new TemplateRegistry {
                _template1, _template2
            });
            configurePolicies();
            configureBinders();

            registerBindersAndPolicies();

            OtherTemplateBinder.Reset();
            OtherTemplatePolicy.Reset();
        }