public void ASSERT_WAIT_FOR_PUBSUB(Client client, int timeout, bool expected) { bool got = true; try { got = client.WaitForPubSub(timeout); } catch (Exception e) { fail(string.Format("ASSERT_WAIT_FOR_PUBSUB failed: {0}", e.Message)); } if (expected != got) { fail(string.Format("ASSERT_WAIT_FOR_PUBSUB failed: expected {0} but got {1}", expected, got)); } }
public void ASSERT_PUBSUB_RESULT_SET(Client client, String pubsubid, String action, int rows, int columns) { int readRows = 0; while (readRows < rows) { if (!client.WaitForPubSub(100)) { fail(string.Format("ASSERT_PUBSUB_RESULT_SET failed expected {0} rows but got {1}", rows, readRows)); return; } ASSERT_PUBSUBID_VALUE(client, pubsubid); ASSERT_ACTION(client, action); while (client.NextRow()) { readRows++; ASSERT_COLUMN_COUNT(client, columns); for (int col = 0; col < columns; col++) { ASSERT_NON_EMPTY_VALUE(client, col); } } } }