super("ListPersistentRequests");
}
+ /**
+ * Creates a new “ListPersistentRequests” command that lists all persistent
+ * requests in the current queue. The given identifier will be set as
+ * “ListRequestIdentifier” on all replies this message generates.
+ *
+ * @param identifier The identifier for the request
+ */
+ public ListPersistentRequests(String identifier) {
+ super("ListPersistentRequests");
+ setField("Identifier", identifier);
+ }
+
}
}
@Test
+ public void listPersistentRequestsWithIdentifierHasCorrectName() {
+ ListPersistentRequests listPersistentRequests = new ListPersistentRequests("identifier");
+ assertThat(listPersistentRequests.getName(), equalTo("ListPersistentRequests"));
+ }
+
+ @Test
public void newListPersistentRequestsHasNoIdentifier() {
ListPersistentRequests listPersistentRequests = new ListPersistentRequests();
assertThat(listPersistentRequests.getField("Identifier"), nullValue());
}
+ @Test
+ public void newListPersistentRequestsWithIdentifierHasIdentifier() {
+ ListPersistentRequests listPersistentRequests = new ListPersistentRequests("identifier");
+ assertThat(listPersistentRequests.getField("Identifier"), equalTo("identifier"));
+ }
+
}