当前位置: 首页>>代码示例>>Java>>正文


Java CommonsTestHelper.testGetClone方法代码示例

本文整理汇总了Java中com.helger.commons.mock.CommonsTestHelper.testGetClone方法的典型用法代码示例。如果您正苦于以下问题:Java CommonsTestHelper.testGetClone方法的具体用法?Java CommonsTestHelper.testGetClone怎么用?Java CommonsTestHelper.testGetClone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.helger.commons.mock.CommonsTestHelper的用法示例。


在下文中一共展示了CommonsTestHelper.testGetClone方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsMap <String, String> aTest = new CommonsHashMap <> ();
  aTest.put ("aaa", "bla");
  aTest.put ("bbb", "blb");
  aTest.put ("ccc", "blc");

  final ICommonsOrderedSet <String> aSortedKeys = aTest.getSortedByKey (Comparator.naturalOrder ()).copyOfKeySet ();
  assertEquals ("aaa", aSortedKeys.getAtIndex (0));
  assertEquals ("bbb", aSortedKeys.getAtIndex (1));
  assertEquals ("ccc", aSortedKeys.getAtIndex (2));

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);

  assertEquals (3, aTest.size ());
  aTest.removeIf (e -> !e.getKey ().startsWith ("c"));
  assertEquals (1, aTest.size ());
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:21,代码来源:CommonsHashMapTest.java

示例2: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsMap <String, String> aTest = new CommonsTreeMap<> ();
  aTest.put ("aaa", "bla");
  aTest.put ("bbb", "blb");
  aTest.put ("ccc", "blc");

  final ICommonsOrderedSet <String> aSortedKeys = aTest.getSortedByKey (Comparator.naturalOrder ()).copyOfKeySet ();
  assertEquals ("aaa", aSortedKeys.getAtIndex (0));
  assertEquals ("bbb", aSortedKeys.getAtIndex (1));
  assertEquals ("ccc", aSortedKeys.getAtIndex (2));

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:CommonsTreeMapTest.java

示例3: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsSet <String> aTest = new CommonsHashSet<> ();
  aTest.add ("aaa");
  aTest.add ("bbb");
  aTest.add ("ccc");

  final ICommonsList <String> aSortedKeys = aTest.getSorted (Comparator.naturalOrder ());
  assertEquals ("aaa", aSortedKeys.getAtIndex (0));
  assertEquals ("bbb", aSortedKeys.getAtIndex (1));
  assertEquals ("ccc", aSortedKeys.getAtIndex (2));

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:CommonsHashSetTest.java

示例4: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsMap <String, String> aTest = new CommonsConcurrentHashMap<> ();
  aTest.put ("aaa", "bla");
  aTest.put ("bbb", "blb");
  aTest.put ("ccc", "blc");

  final ICommonsSet <String> aSortedKeys = aTest.getSortedByKey (Comparator.naturalOrder ()).copyOfKeySet ();
  assertEquals ("aaa", aSortedKeys.getAtIndex (0));
  assertEquals ("bbb", aSortedKeys.getAtIndex (1));
  assertEquals ("ccc", aSortedKeys.getAtIndex (2));

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:CommonsConcurrentHashMapTest.java

示例5: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsMap <String, String> aTest = new CommonsLinkedHashMap<> ();
  aTest.put ("aaa", "bla");
  aTest.put ("bbb", "blb");
  aTest.put ("ccc", "blc");

  final ICommonsOrderedSet <String> aSortedKeys = aTest.getSortedByKey (Comparator.naturalOrder ()).copyOfKeySet ();
  assertEquals ("aaa", aSortedKeys.getAtIndex (0));
  assertEquals ("bbb", aSortedKeys.getAtIndex (1));
  assertEquals ("ccc", aSortedKeys.getAtIndex (2));

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:CommonsLinkedHashMapTest.java

示例6: testVerticalAlign

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testVerticalAlign ()
{
  final ExcelStyle e = new ExcelStyle ();
  assertNull (e.getVerticalAlign ());
  CommonsTestHelper.testGetClone (e);
  for (final VerticalAlignment eAlign : VerticalAlignment.values ())
  {
    assertSame (e, e.setVerticalAlign (eAlign));
    assertEquals (eAlign, e.getVerticalAlign ());
    CommonsTestHelper.testGetClone (e);
  }
}
 
开发者ID:phax,项目名称:ph-poi,代码行数:14,代码来源:ExcelStyleTest.java

示例7: testWrapText

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testWrapText ()
{
  final ExcelStyle e = new ExcelStyle ();
  assertTrue (e.isWrapText () == ExcelStyle.DEFAULT_WRAP_TEXT);
  CommonsTestHelper.testGetClone (e);
  assertSame (e, e.setWrapText (true));
  assertTrue (e.isWrapText ());
  CommonsTestHelper.testGetClone (e);
  assertSame (e, e.setWrapText (false));
  assertFalse (e.isWrapText ());
  CommonsTestHelper.testGetClone (e);
}
 
开发者ID:phax,项目名称:ph-poi,代码行数:14,代码来源:ExcelStyleTest.java

示例8: testDefaultImpl

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testDefaultImpl ()
{
  TelephoneNumber a = new TelephoneNumber ();
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber (a));
  CommonsTestHelper.testGetClone (a);

  a = new TelephoneNumber ();
  a.setType (ETelephoneType.PERSONAL);
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new TelephoneNumber ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber (a));
  CommonsTestHelper.testGetClone (a);

  a = new TelephoneNumber ();
  a.setCountryCode ("0043");
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new TelephoneNumber ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber (a));
  CommonsTestHelper.testGetClone (a);

  a = new TelephoneNumber ();
  a.setAreaCode ("01");
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new TelephoneNumber ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber (a));
  CommonsTestHelper.testGetClone (a);

  a = new TelephoneNumber ();
  a.setLine ("1231234");
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new TelephoneNumber ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber (a));
  CommonsTestHelper.testGetClone (a);

  a = new TelephoneNumber ();
  a.setDirectDial ("47");
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new TelephoneNumber ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new TelephoneNumber (a));
  CommonsTestHelper.testGetClone (a);
}
 
开发者ID:phax,项目名称:ph-masterdata,代码行数:39,代码来源:TelephoneNumberTest.java

示例9: testAlign

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testAlign ()
{
  final ExcelStyle e = new ExcelStyle ();
  assertNull (e.getAlign ());
  CommonsTestHelper.testGetClone (e);
  for (final HorizontalAlignment eAlign : HorizontalAlignment.values ())
  {
    assertSame (e, e.setAlign (eAlign));
    assertEquals (eAlign, e.getAlign ());
    CommonsTestHelper.testGetClone (e);
  }
}
 
开发者ID:phax,项目名称:ph-poi,代码行数:14,代码来源:ExcelStyleTest.java

示例10: testEntrySetToArray

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testEntrySetToArray ()
{
  final SoftHashMap <Integer, BigDecimal> aMap = new SoftHashMap<> ();

  aMap.put (Integer.valueOf (1), BigDecimal.TEN);
  assertEquals (1, aMap.entrySet ().size ());
  assertEquals (1, aMap.entrySet ().toArray ().length);
  assertEquals (1, aMap.entrySet ().toArray (new Map.Entry [0]).length);
  assertEquals (1, aMap.entrySet ().toArray (new Map.Entry [5]).length);
  assertEquals (5, aMap.entrySet ().toArray (new MapEntry [5]).length);

  CommonsTestHelper.testGetClone (aMap);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:15,代码来源:SoftHashMapTest.java

示例11: testEntrySetToArray

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testEntrySetToArray ()
{
  final SoftLinkedHashMap <Integer, BigDecimal> aMap = new SoftLinkedHashMap<> (17);

  aMap.put (Integer.valueOf (1), BigDecimal.TEN);
  assertEquals (1, aMap.entrySet ().size ());
  assertEquals (1, aMap.entrySet ().toArray ().length);
  assertEquals (1, aMap.entrySet ().toArray (new Map.Entry [0]).length);
  assertEquals (1, aMap.entrySet ().toArray (new Map.Entry [5]).length);
  assertEquals (5, aMap.entrySet ().toArray (new MapEntry [5]).length);

  CommonsTestHelper.testGetClone (aMap);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:15,代码来源:SoftLinkedHashMapTest.java

示例12: testDefaultImpl

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testDefaultImpl ()
{
  ExtendedEmailAddress a = new ExtendedEmailAddress ();
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new ExtendedEmailAddress ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new ExtendedEmailAddress (a));
  CommonsTestHelper.testGetClone (a);

  a = new ExtendedEmailAddress ();
  a.setType (EEmailAddressType.PERSONAL);
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new ExtendedEmailAddress ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new ExtendedEmailAddress (a));
  CommonsTestHelper.testGetClone (a);

  a = new ExtendedEmailAddress ();
  a.setAddress ("[email protected]");
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new ExtendedEmailAddress ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new ExtendedEmailAddress (a));
  CommonsTestHelper.testGetClone (a);

  a = new ExtendedEmailAddress ();
  a.setPersonal ("Ich & Du");
  CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (a, new ExtendedEmailAddress ());
  CommonsTestHelper.testDefaultImplementationWithEqualContentObject (a, new ExtendedEmailAddress (a));
  CommonsTestHelper.testGetClone (a);
  CommonsTestHelper.testDefaultSerialization (a);
}
 
开发者ID:phax,项目名称:ph-masterdata,代码行数:28,代码来源:ExtendedEmailAddressTest.java

示例13: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsList <String> aTest = new CommonsLinkedList<> ();
  assertTrue (aTest.isEmpty ());
  aTest.add ("aaa");
  aTest.add ("bbb");
  aTest.add ("ccc");

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:13,代码来源:CommonsLinkedListTest.java

示例14: testBasic

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testBasic ()
{
  final ICommonsList <String> aTest = new CommonsArrayList<> ();
  assertTrue (aTest.isEmpty ());
  aTest.add ("aaa");
  aTest.add ("bbb");
  aTest.add ("ccc");

  CommonsTestHelper.testDefaultSerialization (aTest);
  CommonsTestHelper.testGetClone (aTest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:13,代码来源:CommonsArrayListTest.java

示例15: testFillPattern

import com.helger.commons.mock.CommonsTestHelper; //导入方法依赖的package包/类
@Test
public void testFillPattern ()
{
  final ExcelStyle e = new ExcelStyle ();
  assertNull (e.getFillPattern ());
  CommonsTestHelper.testGetClone (e);
  for (final FillPatternType ePattern : FillPatternType.values ())
  {
    assertSame (e, e.setFillPattern (ePattern));
    assertEquals (ePattern, e.getFillPattern ());
    CommonsTestHelper.testGetClone (e);
  }
}
 
开发者ID:phax,项目名称:ph-poi,代码行数:14,代码来源:ExcelStyleTest.java


注:本文中的com.helger.commons.mock.CommonsTestHelper.testGetClone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。