Add tests for most command plugins

This commit is contained in:
Gary Tierney
2018-09-04 00:02:00 +01:00
parent 9a8f94df18
commit 2ea0f68eb9
7 changed files with 258 additions and 4 deletions
@@ -1,5 +1,8 @@
package org.apollo.game.model;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
* Represents an animation.
*
@@ -60,4 +63,28 @@ public final class Animation {
return id;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animation animation = (Animation) o;
return delay == animation.delay && id == animation.id;
}
@Override
public int hashCode() {
return Objects.hashCode(delay, id);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("delay", delay)
.add("id", id)
.toString();
}
}