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

Do not use deprecated junit.framework.* classes #243

Merged

Conversation

Projects
None yet
3 participants
@dpursehouse
Copy link
Contributor

commented Sep 1, 2015

Replace them with org.junit.Assert.*

Also replace net.sf.ezmorph.test.ArrayAssertions.assertEquals
with org.junit.Assert.assertEquals.

Change-Id: I788d15761c3c2a7b4935e669bcc51d8f318f3602

Do not use deprecated junit.framework.* classes
Replace them with org.junit.Assert.*

Also replace net.sf.ezmorph.test.ArrayAssertions.assertEquals
with org.junit.Assert.assertEquals.

Change-Id: I788d15761c3c2a7b4935e669bcc51d8f318f3602
@jenkinsadmin

This comment has been minimized.

Copy link
Member

commented Sep 1, 2015

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

import static junit.framework.TestCase.assertSame;
import static junit.framework.TestCase.fail;
import static net.sf.ezmorph.test.ArrayAssertions.assertEquals;
import static org.junit.Assert.assertEquals;

This comment has been minimized.

Copy link
@rsandell

rsandell Sep 1, 2015

Member

assertEquals(String message, Object[] expecteds, Object[] actuals) is deprecated use assertArrayEquals

This comment has been minimized.

Copy link
@dpursehouse

dpursehouse Sep 1, 2015

Author Contributor

The only usage of assertEquals is this one at line 165:

assertEquals(1, project.getLastCompletedBuild().getNumber());

which is actually assertEquals(int, int).

So the import here of net.sf.ezmorph.test.ArrayAssertions.assertEquals was wrong. I'm surprised it wasn't causing other compilation warnings or errors.

rsandell added a commit that referenced this pull request Sep 1, 2015

Merge pull request #243 from dpursehouse/fix-junit-assert-deprecation…
…-warnings

Do not use deprecated junit.framework.* classes

@rsandell rsandell merged commit 97a4f19 into jenkinsci:master Sep 1, 2015

1 check passed

Jenkins This pull request looks good
Details

@dpursehouse dpursehouse deleted the dpursehouse:fix-junit-assert-deprecation-warnings branch Sep 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.