コード例 #1
0
        public void AddResourceTest()
        {
            SuperAccount admin = new SuperAccount();
            Dictionary <string, string> resource_info = new Dictionary <string, string>
            {
                { "resourceID", "1000" },
                { "positionX", "50" },
                { "positionY", "50" },
                { "positionZ", "2" },
                { "isUsable", "true" },
                { "isWithPower", "true" },
                { "isNearWindow", "false" }
            };

            Assert.AreEqual(SuperAccount.Error.OK, admin.AddResource(ref resource_info));
            Dictionary <string, string> resource_info2 = new Dictionary <string, string>
            {
                { "resourceID", null },
                { "positionX", "50" },
                { "positionY", "50" },
                { "positionZ", "2" },
                { "isUsable", "true" },
                { "isWithPower", "true" },
                { "isNearWindow", "false" }
            };

            Assert.AreEqual(SuperAccount.Error.PARAM_FORMAT_ERROR, admin.AddResource(ref resource_info2));
        }
コード例 #2
0
        public void DelUserTest()
        {
            SuperAccount admin = new SuperAccount();
            Dictionary <string, string> user_info = new Dictionary <string, string>
            {
                { "usrID", "20170009" }
            };

            Assert.AreEqual(SuperAccount.Error.OK, admin.DelUser(ref user_info));
            Assert.AreEqual(SuperAccount.Error.USER_UNEXISTED, admin.DelUser(ref user_info));
        }
コード例 #3
0
        public void DelResourceTest()
        {
            SuperAccount admin = new SuperAccount();
            Dictionary <string, string> resource_info = new Dictionary <string, string>
            {
                { "resourceID", "1000" }
            };

            Assert.AreEqual(SuperAccount.Error.OK, admin.DelResource(ref resource_info));
            Assert.AreEqual(SuperAccount.Error.RES_UNEXISTED, admin.DelResource(ref resource_info));
        }
コード例 #4
0
 private ManagerSystem()
 {
     MyAccount           = new Account();
     MyExhibitSeatHandle = new ExhibitSeatHandle();
     MySuperAccount      = new SuperAccount();
 }