Example #1
0
        public void TestAddApp()
        {
            PlatformWS.PlatformServicesClient client = new PlatformWS.PlatformServicesClient();
            bool actual = false;

            PlatformWS.ModuleInfo model = new PlatformWS.ModuleInfo()
            {
                ModuleID = Guid.NewGuid().ToString(),
                ModuleCode = "13",
                ModuleIcon = "无",
                ModuleName = "SMT.EM.UI",
                UseState = "1",
                ClientID = "1.0.0.1000",
                Description = "人力资源管理系统",
                EnterAssembly = "SMT.EM.UI",
                ParentModuleID = "0",
                ModuleType = "SMT.EM.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
                FileName = "SMT.EM.UI.xap",
                FilePath = "无",
                HostAddress = "172.30.50.13",
                IsSave = "1",
                ServerID = "1.0.0.1000",
                Version = "1.0.0.1000"
            };
            actual = client.AddModule(model);

            //异常:字段大小问题
            bool expected = true;
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void TestAddAppList()
        {
            PlatformWS.PlatformServicesClient client = new PlatformWS.PlatformServicesClient();
            bool actual = false;
            List<PlatformWS.ModuleInfo> models = CreateTestDate();

            foreach (var itemModel in models)
            {
                actual = client.AddModule(itemModel);
            }
            //The socket connection was aborted. 
            //This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, 
            //or an underlying network resource issue. Local socket timeout was '00:00:59.9840000'.
            //套接字连接中断,可能是由于消息处理错误,或者远程宿主接受超时引起,或者是底层网络资源问题导致,本地套接字时间是'00:00:59.7656250'。
            //修改:receiveTimeout="10:10:10"
            bool expected = true;
            Assert.AreEqual(expected, actual);
        }