Java Code Examples for org.apache.commons.lang3.exception.CloneFailedException#getCause()
The following examples show how to use
org.apache.commons.lang3.exception.CloneFailedException#getCause() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ObjectUtilsTest.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests {@link ObjectUtils#clone(Object)} with an uncloneable object. */ @Test(expected = NoSuchMethodException.class) public void testCloneOfUncloneable() throws Throwable { final UncloneableString string = new UncloneableString("apache"); try { ObjectUtils.clone(string); fail("Thrown " + CloneFailedException.class.getName() + " expected"); } catch (final CloneFailedException e) { throw e.getCause(); } }
Example 2
Source File: ObjectUtilsTest.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests {@link ObjectUtils#cloneIfPossible(Object)} with an uncloneable object. */ @Test(expected = NoSuchMethodException.class) public void testPossibleCloneOfUncloneable() throws Throwable { final UncloneableString string = new UncloneableString("apache"); try { ObjectUtils.cloneIfPossible(string); fail("Thrown " + CloneFailedException.class.getName() + " expected"); } catch (final CloneFailedException e) { throw e.getCause(); } }
Example 3
Source File: ObjectUtilsTest.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests {@link ObjectUtils#clone(Object)} with an uncloneable object. */ @Test(expected = NoSuchMethodException.class) public void testCloneOfUncloneable() throws Throwable { final UncloneableString string = new UncloneableString("apache"); try { ObjectUtils.clone(string); fail("Thrown " + CloneFailedException.class.getName() + " expected"); } catch (final CloneFailedException e) { throw e.getCause(); } }
Example 4
Source File: ObjectUtilsTest.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests {@link ObjectUtils#cloneIfPossible(Object)} with an uncloneable object. */ @Test(expected = NoSuchMethodException.class) public void testPossibleCloneOfUncloneable() throws Throwable { final UncloneableString string = new UncloneableString("apache"); try { ObjectUtils.cloneIfPossible(string); fail("Thrown " + CloneFailedException.class.getName() + " expected"); } catch (final CloneFailedException e) { throw e.getCause(); } }
Example 5
Source File: ObjectUtilsTest.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests {@link ObjectUtils#clone(Object)} with an uncloneable object. */ @Test(expected = NoSuchMethodException.class) public void testCloneOfUncloneable() throws Throwable { final UncloneableString string = new UncloneableString("apache"); try { ObjectUtils.clone(string); fail("Thrown " + CloneFailedException.class.getName() + " expected"); } catch (final CloneFailedException e) { throw e.getCause(); } }
Example 6
Source File: ObjectUtilsTest.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Tests {@link ObjectUtils#cloneIfPossible(Object)} with an uncloneable object. */ @Test(expected = NoSuchMethodException.class) public void testPossibleCloneOfUncloneable() throws Throwable { final UncloneableString string = new UncloneableString("apache"); try { ObjectUtils.cloneIfPossible(string); fail("Thrown " + CloneFailedException.class.getName() + " expected"); } catch (final CloneFailedException e) { throw e.getCause(); } }