Examples of RebelMainModel


Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

    XMLUnit.setIgnoreComments(true);
  }
 
  @Test
  public void testXmlWithClasspathDir() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setDirectory("build/classes");
    model.addClasspathDir(resource);
   
    String generatedXml = writer.toXmlString(model);
   
   
    String expectedResult =
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

  /**
   * Test writing the <jar> tag
   */
  @Test
  public void testXmlWithClasspathJar() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setJar("/my/library.jar");
    model.addClasspathJar(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

  /**
   * Test writing the <dirset> tag
   */
  @Test
  public void testXmlWithClasspathDirset() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setDirset("/my/workspace/build/classes");
    model.addClasspathDirset(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

    assertXMLEqual("Generated rebel.xml not matching with expectation!", expectedResult, generatedXml);
  }
 
  @Test
  public void testXmlWithClasspathJarset() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setJarset("/my/workspace/build/classes");
    model.addClasspathJarset(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

  /**
   * Test writing the <jarset> tag
   */
  @Test
  public void testXmlWithWebResource() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelWebResource resource = new RebelWebResource();
    resource.setDirectory("build/webapp");
    resource.setTarget("/");
    model.addWebResource(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

  /**
   * Test writing the <exclude> and <include> tags.
   */
  @Test
  public void testXmlWithClasspathIncludesExcludes() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setDirectory("build/classes");
    resource.addExclude("*.xml");
    resource.addExclude("*.properties");
    resource.addInclude("**/*.java");
    model.addClasspathDir(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

  /**
   * Test writing the <war> eĺement.
   */
  @Test
  public void testXmlWithWar() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelWar rebelWar = new RebelWar();
    rebelWar.setPath("/my/path");
    model.setWar(rebelWar);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

    // Get and execute the rebel task
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    task.skipWritingRebelXml();
    task.generate();
   
    RebelMainModel model = task.getRebelModel();
   
    // Check the classpath directories
    List<RebelClasspathResource> classpathDirs = model.getClasspathDirs();
    Assert.assertEquals(2, classpathDirs.size());
   
    log.info("classpathDirs size = " + classpathDirs.size());
    for (RebelClasspathResource resource : classpathDirs) {
      String dir = resource.getDirectory();
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

    // Get and execute the rebel task
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    task.skipWritingRebelXml();
    task.generate();
   
    RebelMainModel model = task.getRebelModel();

    // Check the classpath directories
    List<RebelClasspathResource> classpathDirs = model.getClasspathDirs();
    Assert.assertEquals(2, classpathDirs.size());
   
    for (RebelClasspathResource resource : classpathDirs) {
      String dir = resource.getDirectory();
      assertTrue(dir.equals(defaultClassesDir.getAbsolutePath()) || dir.equals(defaultResourcesDir.getAbsolutePath()));
    }

    // Check the web directories
    List<RebelWebResource> webappResources = model.getWebResources();
    Assert.assertEquals(1, webappResources.size());
   
    for (RebelWebResource resource : webappResources) {
      String dir = resource.getDirectory();
      assertTrue(dir.equals(defaultWebappDirectory.getAbsolutePath()));
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel

   
    // execute the task
    task.generate();
   
    // validate the eventual model
    RebelMainModel model = task.getRebelModel();
    RebelWar war = model.getWar();
   
    assertNotNull(war);
    assertEquals(myWarPath, war.getOriginalPath());
   
    cleanUp(project);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.