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)); }
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)); }
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)); }
private ManagerSystem() { MyAccount = new Account(); MyExhibitSeatHandle = new ExhibitSeatHandle(); MySuperAccount = new SuperAccount(); }