public void RegisterType_TypeAlreadyRegistered_Throws_Exception() { EngineConfiguration configuration = new EngineConfiguration(); configuration.RegisterType(typeof(SimpleUser)); Assert.Throws<ArgumentException>(() => { configuration.RegisterType(typeof(SimpleUser)); }); }
public void TestSetup() { IEngineConfiguration configuration = new EngineConfiguration(); IEngineConventionProvider conventionProvider = new Mock<IEngineConventionProvider>().Object; GenerationConfiguration repository = new GenerationConfiguration(configuration, conventionProvider, 10); configuration.RegisterType(typeof(SimpleUser)); mGenerationSession = new GenerationContext(repository); }