Toggle navigation
Home
org.neo4j.bolt.v1.messaging.message.Message to org.neo4j.bolt.v1.messaging.message.ResponseMessage
No. of Instances - 22
No. of Commits - 1
No. of Projects - {'neo4j'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Add or Remove Method invocation
TransportTestUtil.recvOneMessage(client)
to
TransportTestUtil.receiveOneResponseMessage(client)
Cascading Type Change (Similar)
Message
to
ResponseMessage
Connection
to
TransportConnection
TypeSafeMatcher<Connection>
to
TypeSafeMatcher<TransportConnection>
Matcher<Message>
to
Matcher<ResponseMessage>
Message
to
ResponseMessage
List<Message>
to
List<ResponseMessage>
Message
to
ResponseMessage
Message
to
ResponseMessage
List<Message>
to
List<ResponseMessage>
Message
to
ResponseMessage
Update Anonymous class
{ @Override protected boolean matchesSafely( Connection conn){ try { for ( Matcher<Message> matchesMessage : messages) { assertThat(recvOneMessage(conn),matchesMessage); } return true; } catch ( Exception e) { throw new RuntimeException(e); } } @Override public void describeTo( Description description){ description.appendValueList("Messages[",",","]",messages); } }
to
{ @Override protected boolean matchesSafely( TransportConnection conn){ try { for ( Matcher<ResponseMessage> matchesMessage : messages) { final ResponseMessage message=receiveOneResponseMessage(conn); assertThat(message,matchesMessage); } return true; } catch ( Exception e) { throw new RuntimeException(e); } } @Override public void describeTo( Description description){ description.appendValueList("Messages[",",","]",messages); } }
{ @Override protected boolean matchesSafely( Message t){ assertThat(t,instanceOf(SuccessMessage.class)); Map<String,Object> meta=((SuccessMessage)t).meta(); assertThat(meta,Matchers.hasKey("notifications")); Set<Notification> notifications=((List<Map<String,Object>>)meta.get("notifications")).stream().map(TestNotification::fromMap).collect(Collectors.toSet()); assertThat(notifications,Matchers.contains(notification)); return true; } @Override public void describeTo( Description description){ description.appendText("SUCCESS"); } }
to
{ @Override protected boolean matchesSafely( ResponseMessage t){ assertThat(t,instanceOf(SuccessMessage.class)); Map<String,Object> meta=((SuccessMessage)t).meta(); assertThat(meta,Matchers.hasKey("notifications")); Set<Notification> notifications=((List<Map<String,Object>>)meta.get("notifications")).stream().map(TestNotification::fromMap).collect(Collectors.toSet()); assertThat(notifications,Matchers.contains(notification)); return true; } @Override public void describeTo( Description description){ description.appendText("SUCCESS"); } }
Cascading Type Change (Different)
TypeSafeMatcher<Message>
to
TypeSafeMatcher<ResponseMessage>