Ejemplo n.º 1
0
        public void StopLocatorStringsTest()
        {
            var locator = new GfshExecute()
                          .stop()
                          .locator();
            var s = locator.ToString();

            Assert.True(s.Equals("stop locator"));

            locator = new GfshExecute().stop().locator()
                      .withName("name")
                      .withDir("dir");
            s = locator.ToString();
            Assert.True(s.Equals("stop locator --name=name --dir=dir"));
        }
Ejemplo n.º 2
0
        public void CreateRegionStringsTest()
        {
            var region = new GfshExecute()
                         .create()
                         .region();
            var s = region.ToString();

            Assert.True(s.Equals("create region"));

            region = new GfshExecute()
                     .create()
                     .region()
                     .withName("region")
                     .withType("PARTITION");
            s = region.ToString();
            Assert.True(s.Equals("create region --name=region --type=PARTITION"));
        }
Ejemplo n.º 3
0
        public void StopServerStringsTest()
        {
            var server = new GfshExecute()
                         .stop()
                         .server();
            var s = server.ToString();

            Assert.True(s.Equals("stop server"));

            server = new GfshExecute()
                     .stop()
                     .server()
                     .withName("server")
                     .withDir("someDir");
            s = server.ToString();
            Assert.True(s.Equals("stop server --name=server --dir=someDir"));
        }
Ejemplo n.º 4
0
        public void ConfigurePdxStringsTest()
        {
            var configurePdx = new GfshExecute()
                               .configurePdx();
            var s = configurePdx.ToString();

            Assert.Equal(s, "configure pdx");

            configurePdx = new GfshExecute()
                           .configurePdx()
                           .withReadSerialized(true);
            s = configurePdx.ToString();
            Assert.Equal(s, "configure pdx --read-serialized=true");

            configurePdx = new GfshExecute()
                           .configurePdx()
                           .withReadSerialized(false);
            s = configurePdx.ToString();
            Assert.Equal(s, "configure pdx --read-serialized=false");
        }
Ejemplo n.º 5
0
        public void ShutdownStringsTest()
        {
            var shutdown = new GfshExecute()
                           .shutdown();
            var s = shutdown.ToString();

            Assert.True(s.Equals("shutdown"));

            shutdown = new GfshExecute()
                       .shutdown()
                       .withIncludeLocators(true);
            s = shutdown.ToString();
            Assert.True(s.Equals("shutdown --include-locators=true"));

            shutdown = new GfshExecute()
                       .shutdown()
                       .withIncludeLocators(false);
            s = shutdown.ToString();
            Assert.True(s.Equals("shutdown --include-locators=false"));
        }