Package org.dozer.classmap

Examples of org.dozer.classmap.CopyByReference


      configuration.getCustomConverters().addConverter(converterDescription);
      return new CustomConverterBuilder(converterDescription);
    }

    public ConfigurationBuilder copyByReference(String typeMask) {
      CopyByReference copyByReference = new CopyByReference(typeMask);
      configuration.getCopyByReferences().add(copyByReference);
      return this;
    }
View Full Code Here


*/
public class CopyByReferenceTest extends AbstractDozerTest{

  @Test
  public void testMatches_OK() {
    assertTrue(new CopyByReference("java.lang.String").matches("java.lang.String"));
    assertFalse(new CopyByReference("java.lang.String").matches("java.lang.Integer"));
  }
View Full Code Here

    assertFalse(new CopyByReference("java.lang.String").matches("java.lang.Integer"));
  }

  @Test
  public void testMatches_Mask() {
    assertTrue(new CopyByReference("*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.*.String").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.String*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.Stri*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.*tring").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.*tri*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.*tring").matches("java.lang.String"));

    assertFalse(new CopyByReference("com*").matches("java.lang.String"));
    assertFalse(new CopyByReference("java.lang.*f*").matches("java.lang.String"));
  }
View Full Code Here

    assertFalse(new CopyByReference("java.lang.*f*").matches("java.lang.String"));
  }

  @Test
  public void testMatches_SpecialCases() {
    assertFalse(new CopyByReference("java.*.tring").matches("java.lang.String"));
  }
View Full Code Here

      configuration.getCustomConverters().addConverter(converterDescription);
      return new CustomConverterBuilder(converterDescription);
    }

    public ConfigurationBuilder copyByReference(String typeMask) {
      CopyByReference copyByReference = new CopyByReference(typeMask);
      configuration.getCopyByReferences().add(copyByReference);
      return this;
    }
View Full Code Here

*/
public class CopyByReferenceTest extends AbstractDozerTest{

  @Test
  public void testMatches_OK() {
    assertTrue(new CopyByReference("java.lang.String").matches("java.lang.String"));
    assertFalse(new CopyByReference("java.lang.String").matches("java.lang.Integer"));
  }
View Full Code Here

    assertFalse(new CopyByReference("java.lang.String").matches("java.lang.Integer"));
  }

  @Test
  public void testMatches_Mask() {
    assertTrue(new CopyByReference("*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.*.String").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.String*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.Stri*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.*tring").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.lang.*tri*").matches("java.lang.String"));
    assertTrue(new CopyByReference("java.*tring").matches("java.lang.String"));

    assertFalse(new CopyByReference("com*").matches("java.lang.String"));
    assertFalse(new CopyByReference("java.lang.*f*").matches("java.lang.String"));
  }
View Full Code Here

    assertFalse(new CopyByReference("java.lang.*f*").matches("java.lang.String"));
  }

  @Test
  public void testMatches_SpecialCases() {
    assertFalse(new CopyByReference("java.*.tring").matches("java.lang.String"));
  }
View Full Code Here

TOP

Related Classes of org.dozer.classmap.CopyByReference

Copyright © 2018 www.massapicom. 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.