public void PublishSingleObjectOnce() { var obj = new SampleRemotelyReferable(); RemoteObjectAddress address = ObjectServer.PublishObject(obj); Assert.NotNull(address); }
public void PublishSampleRemoteProxy() { var obj = new SampleRemotelyReferable(); RemoteObjectAddress objAddress = ObjectServer.PublishObject(obj); var proxy = new SampleRemoteProxy(objAddress); RemoteObjectAddress proxyAddress = ObjectServer.PublishObject(proxy); Assert.Equal(objAddress, proxyAddress); }
public void PublishSingleObjectTwice() { var obj = new SampleRemotelyReferable(); RemoteObjectAddress address1 = ObjectServer.PublishObject(obj); // if the object is published again it should get the same address // instead of creating a new one RemoteObjectAddress address2 = ObjectServer.PublishObject(obj); Assert.Equal(address1, address2); }