Fixing broken build (error was caused by having two DIFFERENT tests in the same assembly reuse the same service name so the typenames of the dynamic types created by the proxying engine collided). Second test changed to use Guid-generated service name for the registration of its service so no future collisions should be possible.

This commit is contained in:
sbohlen
2010-08-20 20:46:46 +00:00
parent 7ef83af370
commit 3c6e30253d

View File

@@ -50,9 +50,12 @@ namespace Spring.ServiceModel
public void CanCreateHostTwice()
{
DefaultListableObjectFactory of = new DefaultListableObjectFactory();
of.RegisterObjectDefinition("service", new RootObjectDefinition(new RootObjectDefinition(typeof(Service))));
SpringServiceHost ssh = new SpringServiceHost("service", of, true);
SpringServiceHost ssh1 = new SpringServiceHost("service", of, true);
string svcRegisteredName = System.Guid.NewGuid().ToString();
of.RegisterObjectDefinition(svcRegisteredName, new RootObjectDefinition(new RootObjectDefinition(typeof(Service))));
SpringServiceHost ssh = new SpringServiceHost(svcRegisteredName, of, true);
SpringServiceHost ssh1 = new SpringServiceHost(svcRegisteredName, of, true);
}
}
}