コード例 #1
0
        public void Template_resolver_visual_studio_template_correctly(MockContainer <TemplateResolver> templateResolver, ITemplate buildTemplate)
        {
            "Given I have a template resolver"
            ._(() => templateResolver = B.AutoMock <TemplateResolver>());

            "And default configuration"
            ._(() => DefaultConfigurationUtility.PostInit(templateResolver.GetMock <IConfiguration>()));

            "And a set of templates"
            ._(() => TemplateUtility.Defaults(templateResolver.Subject));

            "When I call resolve"
            ._(() => buildTemplate = templateResolver.Subject.Resolve(TemplateType.Source));

            "Then I get a build template back"
            ._(() => buildTemplate.Should().BeOfType <Template>());
        }