Beispiel #1
0
 public void DoesNotImplementProxyFactoryFactory()
 {
     try
     {
         var bcp = new BytecodeProviderImpl();
         bcp.SetProxyFactoryFactory(GetType().AssemblyQualifiedName);
         Assert.Fail();
     }
     catch (HibernateByteCodeException e)
     {
         Assert.That(e.Message,
                     Is.EqualTo(GetType().FullName + " does not implement " + typeof(IProxyFactoryFactory).FullName));
     }
 }
Beispiel #2
0
 public void CantCreateProxyFactoryFactory()
 {
     try
     {
         var bcp = new BytecodeProviderImpl();
         bcp.SetProxyFactoryFactory(typeof(WrongProxyFactoryFactory).AssemblyQualifiedName);
         IProxyFactoryFactory p = bcp.ProxyFactoryFactory;
         Assert.Fail();
     }
     catch (HibernateByteCodeException e)
     {
         Assert.That(e.Message, Is.StringStarting("Failed to create an instance of"));
     }
 }
Beispiel #3
0
 public void UnableToLoadProxyFactoryFactory()
 {
     try
     {
         var bcp = new BytecodeProviderImpl();
         bcp.SetProxyFactoryFactory("whatever");
         Assert.Fail();
     }
     catch (HibernateByteCodeException e)
     {
         Assert.That(e.Message, Is.StringStarting("Unable to load type"));
         Assert.That(e.Message, Is.StringContaining("Possible causes"));
         Assert.That(e.Message, Is.StringContaining("Confirm that your deployment folder contains"));
     }
 }