Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2e33cb8cbdfb3a438b2d7aa8b07e8bddf8dfbd6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.eclipse.jpt.jpadiagrameditor.swtbot.tests.ui.editor;

import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;

public class ElementDisappears extends DefaultCondition{
	
	private String entityName;
	private SWTBotGefEditor gefEditor;
	
	public ElementDisappears(SWTBotGefEditor gefEditor, String entityName){
		super();
		this.gefEditor = gefEditor;
		this.entityName = entityName;
	}

	public boolean test() throws Exception {
		return gefEditor.getEditPart(entityName) == null;
	}

	public String getFailureMessage() {
		return "Entity with name ''" + entityName +  "'' did not show.";
	}


}

Back to the top