| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Tests the {@link StaticUtils#decodeUTF8(byte[])} method. |
| | | * |
| | | * @param inputString |
| | | * The input string. |
| | | * @throws Exception |
| | | * If the test failed unexpectedly. |
| | | */ |
| | | @Test(dataProvider = "getBytesTestData") |
| | | public void testDecodeUTF8(String inputString) throws Exception |
| | | { |
| | | final byte[] bytes = inputString.getBytes("UTF-8"); |
| | | Assert.assertEquals(StaticUtils.decodeUTF8(bytes), inputString); |
| | | } |
| | | |
| | | /** |
| | | * Tests the {@link StaticUtils#getBytes(String)} method. |
| | | * |
| | | * @param inputString |
| | |
| | | * If the test failed unexpectedly. |
| | | */ |
| | | @Test(dataProvider = "listsAreEqualTestData") |
| | | public void testListsAreEqual(List list1, List list2, boolean result) |
| | | public void testListsAreEqual(List<?> list1, List<?> list2, boolean result) |
| | | throws Exception { |
| | | Assert.assertEquals(StaticUtils.listsAreEqual(list1, list2), result); |
| | | } |