Examples of JstdTestCaseStructure


Examples of com.google.jstestdriver.idea.assertFramework.jstd.JstdTestCaseStructure

  private Runnable buildGenerator(@NotNull GenerateActionContext context, @NotNull JstdTestFileStructure fileStructure) {
    if (fileStructure.getTestCaseCount() == 0) {
      return null;
    }
    int caretOffset = context.getDocumentCaretOffset();
    JstdTestCaseStructure testCaseStructure = fileStructure.findEnclosingTestCaseByOffset(caretOffset);
    if (testCaseStructure != null) {
      JSObjectLiteralExpression testsObjectLiteral = testCaseStructure.getTestsObjectsLiteral();
      if (testsObjectLiteral != null) {
        if (!findMethod(testsObjectLiteral)) {
          return new StaticMethodGenerator(testsObjectLiteral, context);
        }
      } else {
        JSCallExpression callExpression = testCaseStructure.getEnclosingCallExpression();
        JSArgumentList argumentList = callExpression.getArgumentList();
        JSExpression[] arguments = JsPsiUtils.getArguments(argumentList);
        if (arguments.length == 1 && arguments[0] != null) {
          return new StaticMethodGeneratorOnNewlyCreatedObjectLiteral(argumentList, context);
        }
View Full Code Here

Examples of com.google.jstestdriver.idea.assertFramework.jstd.JstdTestCaseStructure

  }

  @Nullable
  private static Runnable buildGenerator(@NotNull JstdTestFileStructure fileStructure, @NotNull GenerateActionContext context) {
    int caretOffset = context.getDocumentCaretOffset();
    JstdTestCaseStructure jstdTestCaseStructure = fileStructure.findEnclosingTestCaseByOffset(caretOffset);
    if (jstdTestCaseStructure != null) {
      JSObjectLiteralExpression testsObjectLiteral = jstdTestCaseStructure.getTestsObjectsLiteral();
      if (testsObjectLiteral != null) {
        return new TestGeneratorOnObjectLiteral(testsObjectLiteral, context);
      } else {
        if (jstdTestCaseStructure.getTestCount() == 0) {
          JSCallExpression callExpression = jstdTestCaseStructure.getEnclosingCallExpression();
          JSArgumentList argumentList = callExpression.getArgumentList();
          JSExpression[] arguments = JsPsiUtils.getArguments(argumentList);
          if (arguments.length == 1 && arguments[0] != null) {
            return new TestGeneratorOnNewlyCreatedObjectLiteral(argumentList, context);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.