Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2000-2012 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.execution.testframework.sm.runner.events;
import  jetbrains.buildServer.messages.serviceMessages.TestFailed;
import  org.jetbrains.annotations.NotNull;
import  org.jetbrains.annotations.Nullable;

Author(s):
Sergey Simonchik
public class TestFailedEvent extends TreeNodeEvent {
  private final String myLocalizedFailureMessage;
  private final String myStacktrace;
  private final boolean myTestError;
  private final String myFilePath;
  public TestFailedEvent(@NotNull TestFailed testFailedboolean testError) {
    this(testFailedtestErrornull);
  }
  public TestFailedEvent(@NotNull TestFailed testFailedboolean testErrorString filePath) {
    super(testFailed.getTestName(), TreeNodeEvent.getNodeId(testFailed));
    if (testFailed.getFailureMessage() == nullthrow new NullPointerException();
     = testFailed.getFailureMessage();
     = testFailed.getStacktrace();
     = testError;
     = testFailed.getActual();
     = testFailed.getExpected();
     = filePath;
  }
  public TestFailedEvent(@NotNull String testName,
                         @NotNull String localizedFailureMessage,
                         @Nullable String stackTrace,
                         boolean testError,
                         @Nullable String comparisonFailureActualText,
                         @Nullable String comparisonFailureExpectedText) {
    super(testName, -1);
     = localizedFailureMessage;
     = stackTrace;
     = testError;
     = comparisonFailureActualText;
     = comparisonFailureExpectedText;
     = null;
  }
  @NotNull
  }
  @Nullable
  public String getStacktrace() {
    return ;
  }
  public boolean isTestError() {
    return ;
  }
  @Nullable
  }
  @Nullable
  }
  protected void appendToStringInfo(@NotNull StringBuilder buf) {
    append(buf"localizedFailureMessage");
    append(buf"stacktrace");
    append(buf"isTestError");
    append(buf"comparisonFailureActualText");
    append(buf"comparisonFailureExpectedText");
  }
  public String getFilePath() {
    return ;
  }
New to GrepCode? Check out our FAQ X