public void BasicInfoMessage(Network.Client client, MangalysProtocol.Messages.BasicInfoMessage message) { client.MachineName = message.MachineName; client.UserName = message.UserName; FormDispatcher.RefreshList(ClientsManager.Clients.ToArray()); }
public void ExecuteFormRequiresPostDispatch() { var dispatcher = new FormDispatcher <RazorPage1>(); dispatcher.Dispatch(context, Mock.Of <ILoggingService>()).Wait(); Assert.AreEqual(405, statusCode); Assert.AreEqual(null, context.InternalServiceProvider.GetService <RazorPage1>().result); }
public void ExecuteFormSaveOnDispatch() { SetupContext("post"); var dispatcher = new FormDispatcher <RazorPage1>(); dispatcher.Dispatch(context, Mock.Of <ILoggingService>()).Wait(); var page = context.InternalServiceProvider.GetService <RazorPage1>(); Assert.AreEqual("test123", location); //returned dispatcher Assert.AreEqual("saved", page.result); //saved Assert.AreEqual("12", page.formValues["id"][0]); //set form Assert.IsNotNull(page.LoggingService); }