@Test public void testEqualsTrue() { int progNum = 15; int progVers = 17; OncRpcProgram program1 = new OncRpcProgram(progNum, progVers); OncRpcProgram program2 = new OncRpcProgram(progNum, progVers); assertTrue("Equals programs not detected", program1.equals(program2)); }
@Override public boolean equals(Object obj) { if (obj == this) return true; if ( ! (obj instanceof OncRpcProgram) ) return false; final OncRpcProgram other = (OncRpcProgram) obj; return (this._number == other._number) && (this._version == other._version); }
OncRpcProgram { @Override public boolean equals(Object obj) { if (obj == this) return true; if ( ! (obj instanceof OncRpcProgram) ) return false; final OncRpcProgram other = (OncRpcProgram) obj; return (this._number == other._number) && (this._version == other._version); } }
OncRpcProgram { @Override public boolean equals(Object obj) { if (obj == this) return true; if ( ! (obj instanceof OncRpcProgram) ) return false; final OncRpcProgram other = (OncRpcProgram) obj; return (this._number == other._number) && (this._version == other._version); } OncRpcProgram(int number, int version); }
OncRpcProgram { @Override public boolean equals(Object obj) { if (obj == this) return true; if ( ! (obj instanceof OncRpcProgram) ) return false; final OncRpcProgram other = (OncRpcProgram) obj; return (this._number == other._number) && (this._version == other._version); } OncRpcProgram(int number, int version); int getNumber(); int getVersion(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
OncRpcProgram { @Override public boolean equals(Object obj) { if (obj == this) return true; if ( ! (obj instanceof OncRpcProgram) ) return false; final OncRpcProgram other = (OncRpcProgram) obj; return (this._number == other._number) && (this._version == other._version); } OncRpcProgram(int number, int version); int getNumber(); int getVersion(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }