Skip to content

Commit

Permalink
Merge branch 'node-xy-dockerBuildsImage' of https://github.com/usdot-…
Browse files Browse the repository at this point in the history
…jpo-ode/jpo-ode into node-xy-dockerBuildsImage
  • Loading branch information
hmusavi committed Nov 30, 2018
2 parents d253d98 + 313c890 commit a54f70c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import mockit.Expectations;
import mockit.Injectable;
import mockit.Mocked;
import us.dot.its.jpo.ode.heartbeat.RsuSnmp;

public class RsuSnmpTest {
Expand Down Expand Up @@ -131,25 +130,26 @@ public void shouldReturnEmptyResponse(@Injectable Snmp mockSnmp, @Injectable Res

@Test
public void shouldReturnVariableBindings(@Injectable Snmp mockSnmp, @Injectable ResponseEvent mockResponseEvent,
@Injectable PDU mockPDU, @Mocked Vector<?> mockVector) {
@Injectable PDU mockPDU) {

String inputMessage = "test_rsu_message_1";
String expectedMessage = "test_rsu_message_1";
String expectedMessage = "[test_rsu_message_1]";

Vector<String> fakeVector = new Vector<>();
fakeVector.add(inputMessage);

try {
new Expectations() {
{
mockSnmp.send((PDU) any, (Target) any);
result = mockResponseEvent;
// result = new IOException("testException123");

mockSnmp.close();

mockResponseEvent.getResponse();
result = mockPDU;
mockPDU.getVariableBindings();
result = mockVector;
mockVector.toString();
result = inputMessage;
result = fakeVector;
}
};
} catch (IOException e) {
Expand Down

0 comments on commit a54f70c

Please sign in to comment.