Skip to content

Commit

Permalink
Issue #22 seems to be fixed already.
Browse files Browse the repository at this point in the history
  • Loading branch information
highsource committed Dec 24, 2015
1 parent c483ce9 commit 38670b0
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.jvnet.jaxb2_commons.tests.issues;

import org.junit.Assert;
import org.junit.Test;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;

public class GH22Test {
@Test
public void testJAXBEqualsSymmetryConcreteClassAndEnum() {
Assert.assertFalse(JAXBEqualsStrategy.INSTANCE.equals(null, null,
new SomeConcreteClass(), SomeEnum.ENUM));
}

@Test
public void testJAXBEqualsSymmetryEnumAndConcreteClass() {
// This test fails and throws a ClassCastException
Assert.assertFalse(JAXBEqualsStrategy.INSTANCE.equals(null, null,
SomeEnum.ENUM, new SomeConcreteClass()));
}

private static class SomeConcreteClass {
}

private enum SomeEnum {
ENUM;
}
}

0 comments on commit 38670b0

Please sign in to comment.