Example #1
0
 @Override
 public void evaluate() throws Throwable {
   Assume.assumeTrue(SignUpPage.isSingUpWorked());
   if (authorize && authorizedUserName == null) {
     authorizedUserName = MethodsForTests.createUser(list);
     new LoginPage(driver)
         .get()
         .signIn(authorizedUserName, MethodsForTests.DEFAULT_PASSWORD);
   }
   if (!authorize) {
     driver.manage().deleteAllCookies();
   }
   signUpPage = new SignUpPage(driver).get();
   base.evaluate();
 }
  /*! #if ($TemplateOptions.isKType("int", "short", "byte", "long", "Object")) !*/
  @Test
  public void testToString() {
    Assume.assumeTrue(
        int[].class.isInstance(getKeys(this.set))
            || short[].class.isInstance(getKeys(this.set))
            || byte[].class.isInstance(getKeys(this.set))
            || long[].class.isInstance(getKeys(this.set))
            || Object[].class.isInstance(getKeys(this.set)));

    addFromArray(this.set, this.key1, this.key2);
    String asString = this.set.toString();
    asString = asString.replaceAll("[\\[\\],\\ ]", "");
    final char[] asCharArray = asString.toCharArray();
    Arrays.sort(asCharArray);
    Assert.assertEquals("12", new String(asCharArray));
  }