Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleIntegration Test
linenumberstrue
public class LibraryTest {
    @Rule
    public GfshRule gfshRule = new GfshRule();

    @Test
    public void testSomeLibraryMethod() {
        Library classUnderTest = new Library();
        GfshScript.of("start locator --name=loc",
            "start server --name=serv1",
            "create region --name=test --type=REPLICATE").execute(gfshRule);
        classUnderTest.doPut();
        assertEquals("one", classUnderTest.doGet());
    }
}

 While running this test, a locator and a server JVM will be spun-up by GfshRule.

Step-by-step guide

You need to follow the following steps to get this to work:

...