public void SendServerMessageA() { var result = ServerProxy.ServerMethodA(); Assert.AreEqual(10, result); Assert.IsTrue(Server.MethodCalls.Any()); Assert.AreEqual(Server.MethodCalls[0].MethodName, nameof(ServerMock.ServerMethodA)); }
public void PerformanceTest() { int count = 100; var sw = Stopwatch.StartNew(); for (int i = 0; i < count; i++) { ServerProxy.ServerMethodA(); } sw.Stop(); Assert.AreEqual(Server.MethodCalls.Count, count); Console.WriteLine(sw.Elapsed); }