public static void Main() { SNSPublisher snsPublisher = new SNSPublisher(); snsPublisher.Init(); snsPublisher.PublishMessages(); }
public static void Main() { SNSPublisher snsPublisher = new SNSPublisher(); snsPublisher.Init(); snsPublisher.PublishMessages(); Console.WriteLine("Press any key..."); Console.ReadKey(); }
public void TestSQSSNS() { try { Init(); queueUrl = GetQueueUrl(); int initialNumMessages = GetNumberOfMessages(); SNSPublisher.Main(); int numAfterSnsPublisher = GetNumberOfMessages(); SQSConsumer.main(); int numAfterSQSConsumer = GetNumberOfMessages(); Debug.WriteLine("SqsSnsTest: initialNumMessages: {0}, numAfterSNSPublisher: {1}, numAfterSQSConsumer: {2}", initialNumMessages, numAfterSnsPublisher, numAfterSQSConsumer); if ((numAfterSnsPublisher < initialNumMessages) || (numAfterSQSConsumer > numAfterSnsPublisher)) { Assert.Fail("SqsSnsTest failed. Number of messages in queue not as expected."); } } catch (Exception) { throw; } Debug.WriteLine("SqsSnsTest passed."); }