コード例 #1
0
    @Test
    public void shouldSetStatusToBuildWhenStatusIsModified() {
      lb.setStatus(LoadBalancerStatus.ERROR);

      lbService.addDefaultValues(lb);

      Assert.assertEquals(LoadBalancerStatus.BUILD, lb.getStatus());
    }
コード例 #2
0
    @Test
    public void shouldAddDefaultValuesWhenNoValuesAreSet() {
      lbService.addDefaultValues(lb);

      Assert.assertEquals(LoadBalancerAlgorithm.RANDOM, lb.getAlgorithm());
      Assert.assertEquals(LoadBalancerProtocol.HTTP, lb.getProtocol());
      Assert.assertFalse(lb.isConnectionLogging());
      Assert.assertEquals(defaultProtocol.getPort(), lb.getPort());
      Assert.assertEquals(SessionPersistence.NONE, lb.getSessionPersistence());
      Assert.assertEquals(LoadBalancerStatus.BUILD, lb.getStatus());
      Assert.assertEquals(false, lb.isHalfClosed());
    }