示例#1
0
  @Test
  @Category({P5, FAST, UNIT})
  @Description(
      "Test incomplete VJET atype should parse non-null jst. "
          + "Also it should have bare minimum information baout vjet type")
  public void testProcessType1() {
    CompilationUnitDeclaration ast = prepareAst("typeTranslatorTestFile.js.txt", null);
    IJstType jstType = SyntaxTreeFactory2.createJST(ast, new TranslateCtx());

    List<? extends IJstMethod> staticMethods = jstType.getStaticMethods();
    assertNotNull(staticMethods);
    assertEquals(2, JstTypeHelper.getDeclaredMethods(staticMethods).size());
    IJstMethod jstMethod = getMethodByName(staticMethods, "getRate");
    assertNotNull(jstMethod);
    IJstMethod jstMethod2 = getMethodByName(staticMethods, "getDiscount");
    assertNotNull(jstMethod2);
    assertNotNull(jstType.getMethod("chase"));
  }