Example Fest Code

181 views
Skip to first unread message

Sam Joseph

unread,
Mar 22, 2013, 1:07:13 PM3/22/13
to easytesting
Hi All,

I was wondering if there was a set of complete code examples for using
Fest?

I had been using the old Netbeans Fest plugin, which came with this
example:

private FrameFixture window;

@Before
public void setUp() {
//Assumes the main class is named "Anagrams" and extends
JFrame:
window = new FrameFixture(new Anagrams());
window.show();

}

@Test
public void shouldEnterAnagramAndReturnTrue() {
//Assumes a JTextField named "anagramField":
window.textBox("anagramField").enterText("abstraction");
//Assumes a JButton named "guessButton":
window.button("guessButton").click();
//Assumes a JLabel named "resultLabel":
window.label("resultLabel").requireText("Correct! Try a new
word!");
}

but I realized that it relies on rather old versions of fest.

I've now got the latest versions downloaded from here:

https://code.google.com/p/fest/downloads/list

but I'm wondering if there is some standard set of examples that show
all the different ways in which Fest can be used?

Many thanks in advance
CHEERS> SAM

Reply all
Reply to author
Forward
0 new messages