import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.SimpleLayout;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.annotation.NonNull;
shell.bot().button("Yes").click();
fBot.waitUntil(Conditions.shellCloses(shell));
fBot.waitWhile(new ConditionHelpers.ActiveEventsEditor(fBot, null));
+ fBot.waitUntil(new TraceDeletedCondition());
}
/**
shell.bot().button("Yes").click();
fBot.waitUntil(Conditions.shellCloses(shell));
fBot.waitWhile(new ConditionHelpers.ActiveEventsEditor(fBot, null));
+ fBot.waitUntil(new TraceDeletedCondition());
}
/**
assertTrue(view.bot().tree().hasItems());
view.bot().tree().cell(0, 1).equals(Long.toString(NB_EVENTS));
}
+
+ private final class TraceDeletedCondition extends DefaultCondition {
+ @Override
+ public boolean test() throws Exception {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME).findMember(new Path("Traces/" + TRACE_NAME)) == null;
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return TRACE_NAME + " was not deleted successfully.";
+ }
+ }
}