Exemple #1
0
 public void RegisterAllUnknownClasses()
 {
     using (var resolver = new TestResolver())
     {
         resolver.RegisterAllUnknownTypesAutomatically();
         resolver.Init <DummyRunner>();
         Assert.Throws <AutofacResolver.RegisterCallsMustBeBeforeInit>(
             resolver.RegisterAllUnknownTypesAutomatically);
         resolver.Resolve <ClassWithInnerClass.UnknownInnerClass>();
     }
 }
Exemple #2
0
 public void WindowTitle()
 {
     using (var resolver = new TestResolver())
         Assert.AreEqual(resolver.Resolve <Window>().Title, "WindowMock");
 }