Example #1
0
        public void ThrowsExceptionWhenTemplateNotFound()
        {
            var    templateProvider = new RuntimeEntityTemplateProvider(new EntityTemplate[0]);
            Action act = () => templateProvider.Get("NonExistantTemplate");

            act.ShouldThrow <EntityTemplateNotFoundException>();
        }
Example #2
0
        public void PopulatesExceptionWhenTemplateNotFound()
        {
            var templateProvider = new RuntimeEntityTemplateProvider(new EntityTemplate[0]);
            var templateName     = "NonExistantTemplate";

            Action act = () => templateProvider.Get(templateName);

            act.ShouldThrow <EntityTemplateNotFoundException>().And.TemplateKey.Should().Be(templateName);
        }