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);
        }
        public void ThrowsOnDuplicateTemplateKey()
        {
            Action act = () =>
            {
                var templateProvider = new RuntimeEntityTemplateProvider(new EntityTemplate[]
                {
                    new EntityTemplate("TestKey1", new IComponent[0]),
                    new EntityTemplate("TestKey1", new IComponent[0]),
                    new EntityTemplate("TestKey3", new IComponent[0]),
                });
            };

            act.ShouldThrow<ArgumentException>();
        }
 public void ThrowsExceptionWhenTemplateNotFound()
 {
     var templateProvider = new RuntimeEntityTemplateProvider(new EntityTemplate[0]);
     Action act = () => templateProvider.Get("NonExistantTemplate");
     act.ShouldThrow<EntityTemplateNotFoundException>();
 }