public void CreateTopicTwice_Should_Succeed_WithMatchingArns()
        {
            var store = new ClientDetailsStore();
            AwsClientDetails clientDetails = store.Load(Container);

            SNSHelper helper = new SNSHelper(clientDetails);

            string topicArn  = helper.CreateTopic("TestTopic2");
            string topicArn2 = helper.CreateTopic("TestTopic2");

            Assert.AreEqual(topicArn, topicArn2, "Topic Arn's should match");
        }
        public void CreateTopic_Should_CreateTopic()
        {
            var store = new ClientDetailsStore();
            AwsClientDetails clientDetails = store.Load(Container);

            SNSHelper helper = new SNSHelper(clientDetails);

            string topicId = helper.CreateTopic("TestTopic");

            System.Diagnostics.Debug.WriteLine("Topic Id: " + topicId);

            Assert.IsNotEmpty(topicId);
        }
        public void TestAddPermission_Sets_PermissionsOnTopic()
        {
            var store = new ClientDetailsStore();
            AwsClientDetails clientDetails = store.Load(Container);

            SNSHelper helper   = new SNSHelper(clientDetails);
            string    topicArn = helper.CreateTopic("TestSetPermissionsTopic");

            // TODO: Replace this with a valid AWS account Id.
            string[]     awsAccountIds = new[] { "123456789012" };
            string[]     actionNames   = new[] { "*" };
            const string label         = "Test Topic Permissions";

            // There appears to be an issue with the AWS SDK 1.0.8.1 which failes validation
            // for action names and aws account ids whilst they are valid.
            helper.AddPermission(actionNames, awsAccountIds, label, topicArn);

            // Now clean up and delete the topic.
            helper.DeleteTopic(topicArn);
        }