コード例 #1
0
        public void RegisterType_TypeAlreadyRegistered_Throws_Exception()
        {
            EngineConfiguration configuration = new EngineConfiguration();
            configuration.RegisterType(typeof(SimpleUser));

            Assert.Throws<ArgumentException>(() =>
            {
                configuration.RegisterType(typeof(SimpleUser));
            });
        }
コード例 #2
0
 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);
 }