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

Test bot removal (updated from #4700) #4746

Merged
merged 4 commits into from
Sep 4, 2023

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented Sep 3, 2023

This updates and replaces #4700
In the stuff Im currently doing I find myself often having to update TestBot so I was waiting for #4700 and decided to finish this. This deletes a few more classes and resolves, I think, the two problems in ClientGUI. Also I moved two statics from a deleted file to PhysicalOption which is used in Princess. I started a quick test game with Princess and as far as I could tell, all seemed in order.

@@ -970,11 +966,11 @@
* and a file for salvage
*/
public void doSaveUnit() {
for (Enumeration<Player> iter = getClient().getGame().getPlayers(); iter.hasMoreElements(); ) {
for (Enumeration<Player> iter = getClient().getGame().getPlayers(); iter.hasMoreElements();) {

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
AbstractGame.getPlayers
should be avoided because it has been deprecated.
@@ -117,7 +115,7 @@
}

Player target = null;
for (final Enumeration<Player> i = game.getPlayers(); i.hasMoreElements(); ) {
for (final Enumeration<Player> i = game.getPlayers(); i.hasMoreElements();) {

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
AbstractGame.getPlayers
should be avoided because it has been deprecated.
final Enumeration<Player> playerEnumeration = playerVector.elements();

mockGame = mock(Game.class);
when(mockGame.getPlayersVector()).thenReturn(playerVector);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
AbstractGame.getPlayersVector
should be avoided because it has been deprecated.

mockGame = mock(Game.class);
when(mockGame.getPlayersVector()).thenReturn(playerVector);
when(mockGame.getPlayers()).thenReturn(playerEnumeration);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
AbstractGame.getPlayers
should be avoided because it has been deprecated.
if ((fa >= 300) || (fa <= 60)) {
return ToHitData.SIDE_FRONT;
}
if ((fa >= 60) && (fa <= 120)) {

Check warning

Code scanning / CodeQL

Useless comparison test Warning

Test is always true, because of
this condition
.
if ((fa >= 60) && (fa <= 120)) {
return ToHitData.SIDE_RIGHT;
}
if ((fa >= 240) && (fa <= 300)) {

Check warning

Code scanning / CodeQL

Useless comparison test Warning

Test is always true, because of
this condition
.
@SJuliez SJuliez merged commit 140173b into MegaMek:master Sep 4, 2023
4 checks passed
@SJuliez SJuliez deleted the TestBot-Removal branch October 14, 2023 08:38
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.

3 participants