예제 #1
0
 //test1
 private string Test1()
 {
   //test1
   m_AuthServer = new MockAuthServer();
   Message m1 = new Message();
   m1.TestID = 1;
   AuthResult result0 = m_AuthServer.CreateUser("hshen", "hshen", "hshen");
   if (result0.valid)
   {
     m1.Passed = false;
     m1.Msg = "AuthServer.CreateUser() test1 fails";
   }
   else
   {
     m1.Passed = true;
     m1.Msg = "AuthServer.CreateUser() test1 succeeds";
   }
   return m1.ToString();
 }
예제 #2
0
 //test2
 private string Test2()
 {
   m_AuthServer = new MockAuthServer();
   Message m2 = new Message();
   m2.TestID = 2;
   AuthResult result2 = m_AuthServer.CreateUser("hshen", "hshen", "administrator");
   if (!result2.valid)
   {
     m2.Passed = false;
     m2.Msg = "AuthServer.CreateUser() test2 fails";
   }
   else
   {
     m2.Passed = true;
     m2.Msg = "AuthServer.CreateUser() test2 succeeds";
   }
   return m2.ToString();
 }