public void ThrowsExceptionWhenTemplateNotFound() { var templateProvider = new RuntimeEntityTemplateProvider(new EntityTemplate[0]); Action act = () => templateProvider.Get("NonExistantTemplate"); act.ShouldThrow <EntityTemplateNotFoundException>(); }
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); }