Skip to content
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

Merged
merged 1 commit into from Nov 14, 2014
Merged

Conversation

osmandin
Copy link
Contributor

object.enableVersioning();
session.save();
final FedoraResourceImpl frozenResource = new FedoraResourceImpl(object.getNode());
assert (frozenResource.hashCode() != 0);
Copy link
Contributor

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?

Copy link
Contributor Author

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!

Copy link
Contributor

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? :)

Copy link
Contributor Author

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).

Copy link

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

Copy link
Contributor

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).

@osmandin osmandin force-pushed the 81483926-2 branch 2 times, most recently from 5ba0959 to ee31342 Compare November 13, 2014 15:47
}

@Test (expected = RepositoryRuntimeException.class)
public void testBaseVersioningException() throws RepositoryException {
Copy link

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() ?

awoods pushed a commit that referenced this pull request Nov 14, 2014
@awoods awoods merged commit bbba2a4 into fcrepo:master Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants