コード例 #1
0
  @Test
  public void testGetSetAccessedAt() {
    // Arrange
    Calendar expectedAccessedAt = Calendar.getInstance();
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Calendar actualAccessedAt = topicInfo.setAccessedAt(expectedAccessedAt).getAccessedAt();

    // Assert
    assertEquals(expectedAccessedAt, actualAccessedAt);
  }
コード例 #2
0
  @Test
  public void testGetSetUserMetadata() {
    // Arrange
    String expectedUserMetadata = "expectedUserMetaData";
    TopicInfo topicInfo = new TopicInfo();

    // Act
    String actualUserMetadata = topicInfo.setUserMetadata(expectedUserMetadata).getUserMetadata();

    // Assert
    assertEquals(expectedUserMetadata, actualUserMetadata);
  }
コード例 #3
0
  @Test
  public void testGetSetStatus() {
    // Arrange
    EntityStatus expectedEntityStatus = EntityStatus.ACTIVE;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    EntityStatus actualEntityStatus = topicInfo.setStatus(expectedEntityStatus).getStatus();

    // Assert
    assertEquals(expectedEntityStatus, actualEntityStatus);
  }
コード例 #4
0
  @Test
  public void testGetSetSizeInBytes() {
    // Arrange
    Long expectedSizeInBytes = 1024L;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Long actualSizeInBytes = topicInfo.setSizeInBytes(expectedSizeInBytes).getSizeInBytes();

    // Assert
    assertEquals(expectedSizeInBytes, actualSizeInBytes);
  }
コード例 #5
0
  @Test
  public void testGetSetPartioningPolicy() {
    // Arrange
    PartitioningPolicy expectedPartitioningPolicy = PartitioningPolicy.NO_PARTITIONING;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    PartitioningPolicy actualPartitioningPolicy =
        topicInfo.setPartitioningPolicy(expectedPartitioningPolicy).getPartitioningPolicy();

    // Assert
    assertEquals(expectedPartitioningPolicy, actualPartitioningPolicy);
  }
コード例 #6
0
  @Test
  public void testGetSetAutoDeleteOnIdle() {
    // Arrange
    Duration expectedIsAutoDeleteOnIdle = createDuration(100);
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Duration actualIsAutoDeleteOnIdle =
        topicInfo.setAutoDeleteOnIdle(expectedIsAutoDeleteOnIdle).getAutoDeleteOnIdle();

    // Assert
    assertEquals(expectedIsAutoDeleteOnIdle, actualIsAutoDeleteOnIdle);
  }
コード例 #7
0
  @Test
  public void testGetSetSubscriptionCount() {
    // Arrange
    Integer expectedSubscriptionCount = 1024;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Integer actualSubscriptionCount =
        topicInfo.setSubscriptionCount(expectedSubscriptionCount).getSubscriptionCount();

    // Assert
    assertEquals(expectedSubscriptionCount, actualSubscriptionCount);
  }
コード例 #8
0
  @Test
  public void testGetSetSupportOrdering() {
    // Arrange
    Boolean expectedIsSupportOrdering = true;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Boolean actualIsSupportOrdering =
        topicInfo.setSupportOrdering(expectedIsSupportOrdering).isSupportOrdering();

    // Assert
    assertEquals(expectedIsSupportOrdering, actualIsSupportOrdering);
  }
コード例 #9
0
  @Test
  public void testGetSetAnonymousAccessible() {
    // Arrange
    Boolean expectedAnonymousAccessible = true;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Boolean actualAnonymousAccessible =
        topicInfo.setAnonymousAccessible(expectedAnonymousAccessible).isAnonymousAccessible();

    // Assert
    assertEquals(expectedAnonymousAccessible, actualAnonymousAccessible);
  }
コード例 #10
0
  @Test
  public void testGetSetDuplicateDetectionHistoryTimeWindow() {
    // Arrange
    Duration expectedDefaultMessageTimeToLive = createDuration(100);
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Duration actualDefaultMessageTimeToLive =
        topicInfo
            .setDefaultMessageTimeToLive(expectedDefaultMessageTimeToLive)
            .getDefaultMessageTimeToLive();

    // Assert
    assertEquals(expectedDefaultMessageTimeToLive, actualDefaultMessageTimeToLive);
  }
コード例 #11
0
  @Test
  public void testGetSetRequiresDuplicateDetection() {
    // Arrange
    Boolean expectedRequiresDuplicateDetection = true;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Boolean actualRequiresDuplicateDetection =
        topicInfo
            .setRequiresDuplicateDetection(expectedRequiresDuplicateDetection)
            .isRequiresDuplicateDetection();

    // Assert
    assertEquals(expectedRequiresDuplicateDetection, actualRequiresDuplicateDetection);
  }
コード例 #12
0
  @Test
  public void testGetSetFilteringMessageBeforePublishing() {
    // Arrange
    Boolean expectedFilteringMessageBeforePublishing = true;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Boolean actualFilteringMessageBeforePublishing =
        topicInfo
            .setFilteringMessageBeforePublishing(expectedFilteringMessageBeforePublishing)
            .isFilteringMessageBeforePublishing();

    // Assert
    assertEquals(expectedFilteringMessageBeforePublishing, actualFilteringMessageBeforePublishing);
  }
コード例 #13
0
  @Test
  public void testGetSetEnableBatchedOperations() {
    // Arrange
    Boolean expectedEnableBatchedOperations = true;
    TopicInfo topicInfo = new TopicInfo();

    // Act
    Boolean actualEnableBatchedOperations =
        topicInfo
            .setEnableBatchedOperations(expectedEnableBatchedOperations)
            .isEnableBatchedOperations();

    // Assert
    assertEquals(expectedEnableBatchedOperations, actualEnableBatchedOperations);
  }