public void LoadRemotingHostServer()
{
Loader loader = new Loader(@"RemotingHostServer.st", new SimpleCompiler());
Machine machine = CreateMachine();
loader.LoadAndExecute(machine);
object result = machine.GetGlobalObject("host");
Assert.IsNotNull(result);
Assert.IsInstanceOfType(result, typeof(RemotingHostServer));
RemotingHostServer host = (RemotingHostServer)result;
Loader loader2 = new Loader(@"RemotingHostClient.st", new SimpleCompiler());
Machine machine2 = CreateMachine();
loader2.LoadAndExecute(machine2);
Assert.IsNotNull(machine2.GetGlobalObject("Rectangle"));
Assert.IsNotNull(host.Machine.GetGlobalObject("Rectangle"));
object obj1 = machine2.GetGlobalObject("rect");
object obj2 = host.Machine.GetGlobalObject("rect");
Assert.IsNotNull(obj1);
Assert.IsNotNull(obj2);
Assert.IsInstanceOfType(obj1, typeof(IObject));
Assert.IsInstanceOfType(obj2, typeof(IObject));
IObject rect1 = (IObject)obj1;
IObject rect2 = (IObject)obj2;
Assert.AreEqual(200, rect1[0]);
Assert.AreEqual(30, rect1[1]);
Assert.AreEqual(300, rect2[0]);
Assert.AreEqual(40, rect2[1]);
host.Stop();
}