Java 类com.amazonaws.services.sns.model.SetTopicAttributesResult 实例源码

项目:unitstack    文件:MockSnsTest.java   
@Test
public void testGetSetTopicAttributes_shouldAddAndRespondAttributes() {
  mockSns(new MockParameters());
  CreateTopicResult topicResult = sns.createTopic(new CreateTopicRequest().withName("attributefull-topic"));

  SetTopicAttributesResult setAttrResult = sns.setTopicAttributes(topicResult.getTopicArn(), "planet", "Omega 3");
  assertNotNull(setAttrResult);

  GetTopicAttributesResult topicAttributes = sns.getTopicAttributes(new GetTopicAttributesRequest().withTopicArn(topicResult.getTopicArn()));

  assertEquals("verify added attribute is correct", "Omega 3", topicAttributes.getAttributes().get("planet"));

  sns.deleteTopic(topicResult.getTopicArn());
}
项目:Camel    文件:AmazonSNSClientMock.java   
@Override
public SetTopicAttributesResult setTopicAttributes(SetTopicAttributesRequest setTopicAttributesRequest) throws AmazonServiceException, AmazonClientException {
    Assert.assertEquals(DEFAULT_TOPIC_ARN, setTopicAttributesRequest.getTopicArn());
    Assert.assertEquals("Policy", setTopicAttributesRequest.getAttributeName());
    Assert.assertEquals("XXX", setTopicAttributesRequest.getAttributeValue());
    return new SetTopicAttributesResult();
}