New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FedoraResourceImpl related tests #643
Conversation
object.enableVersioning(); | ||
session.save(); | ||
final FedoraResourceImpl frozenResource = new FedoraResourceImpl(object.getNode()); | ||
assert (frozenResource.hashCode() != 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space here. Actually, shouldn't this be some kind of JUnit assertion and not just assert
, which won't get executed without special runtime JVM flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it. Actually, the PR got messed up anyway, so I'll have to re-do this a bit. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra space was because assert
is a keyword, so it was right, but it was wrong. Y'know? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default assertions are enabled with failsafe and surefire. (unless I'm mistaken).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use org.junit.Assert.assertTrue() or assertFalse() or assertEquals() etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd still rather see a more standard JUnit assertion here, like assertFalse(frozenResource.hashCode() == 0)
.
5ba0959
to
ee31342
Compare
} | ||
|
||
@Test (expected = RepositoryRuntimeException.class) | ||
public void testBaseVersioningException() throws RepositoryException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test exercising anything different than the test above: testNullBaseVersion()
?
Add FedoraResourceImpl related tests https://www.pivotaltracker.com/story/show/82745186
https://www.pivotaltracker.com/story/show/81483926