示例#1
0
 private Xid randomXid(Boolean trueForPositive) {
   while (true) {
     Xid xid = new XidImpl(randomBytes(), randomBytes());
     if (trueForPositive == null || xid.hashCode() > 0 == trueForPositive.booleanValue())
       return xid;
   }
 }
 @Test
 public void testAuthenticateFail() {
   System.out.println("authenticate Pass");
   Login login = new Login("notadmin", "notrosebud");
   AuthenticationMgr authMgr = new AuthenticationMgr();
   boolean expResult = false;
   try {
     Boolean value = authMgr.authenticate(login);
     boolean result = value.booleanValue();
     assertEquals(expResult, result);
   } catch (Exception e) {
     fail("Exception Thrown");
   }
 }
示例#3
0
 public CreoleParseTest(File creoleFile, File htmlExpectFile, File htmlFile, Boolean doSucceed) {
   this.creoleFile = creoleFile;
   this.htmlExpectFile = htmlExpectFile;
   this.htmlFile = htmlFile;
   shouldSucceed = doSucceed.booleanValue();
 }