示例#1
0
        public void BasicInfoMessage(Network.Client client, MangalysProtocol.Messages.BasicInfoMessage message)
        {
            client.MachineName = message.MachineName;
            client.UserName    = message.UserName;

            FormDispatcher.RefreshList(ClientsManager.Clients.ToArray());
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }