public void GetRootObject_ProxyObjectBase() { IMockRoot proxy = _client.GetRootObject <IMockRoot>(); Assert.IsNotNull(proxy, "Returned object is null!"); Assert.IsTrue(proxy.SimpleProperty == _mockObject.SimpleProperty); Assert.IsTrue(proxy.Members.Count == _mockObject.Members.Count); }
public void ResolveProxyTypesLocal_ProxyObjectBase(ServerHost server, RemoteClient client, Type expectedType) { server.Start(); client.ConnectAsync($"127.0.0.1:{server.ListenPort}").Wait(); var proxy = client.GetRootObject <IMockRoot>(); server.Dispose(); client.Dispose(); Assert.IsNotNull(proxy, "GetRootObject returned null!"); Assert.IsTrue(proxy.GetType() == expectedType, $"Returned type not expected! {proxy} : {expectedType}"); }