本文整理汇总了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 ());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}