Java 类org.apache.catalina.filters.ExpiresFilter.StartingPoint 实例源码

项目:tomcat7    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationCombinedDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 1 month 15 days 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(3, actualConfiguration.getDurations().size());

}
项目:tomcat7    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationMonoDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(1, actualConfiguration.getDurations().size());
    Assert.assertEquals(2,
            actualConfiguration.getDurations().get(0).getAmount());
    Assert.assertEquals(DurationUnit.HOUR,
            actualConfiguration.getDurations().get(0).getUnit());

}
项目:apache-tomcat-7.0.73-with-comment    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationCombinedDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 1 month 15 days 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(3, actualConfiguration.getDurations().size());

}
项目:apache-tomcat-7.0.73-with-comment    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationMonoDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(1, actualConfiguration.getDurations().size());
    Assert.assertEquals(2,
            actualConfiguration.getDurations().get(0).getAmount());
    Assert.assertEquals(DurationUnit.HOUR,
            actualConfiguration.getDurations().get(0).getUnit());

}
项目:class-guard    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationCombinedDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 1 month 15 days 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(3, actualConfiguration.getDurations().size());

}
项目:class-guard    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationMonoDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(1, actualConfiguration.getDurations().size());
    Assert.assertEquals(2,
            actualConfiguration.getDurations().get(0).getAmount());
    Assert.assertEquals(DurationUnit.HOUR,
            actualConfiguration.getDurations().get(0).getUnit());

}
项目:apache-tomcat-7.0.57    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationCombinedDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 1 month 15 days 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(3, actualConfiguration.getDurations().size());

}
项目:apache-tomcat-7.0.57    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationMonoDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(1, actualConfiguration.getDurations().size());
    Assert.assertEquals(2,
            actualConfiguration.getDurations().get(0).getAmount());
    Assert.assertEquals(DurationUnit.HOUR,
            actualConfiguration.getDurations().get(0).getUnit());

}
项目:apache-tomcat-7.0.57    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationCombinedDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 1 month 15 days 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(3, actualConfiguration.getDurations().size());

}
项目:apache-tomcat-7.0.57    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationMonoDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(1, actualConfiguration.getDurations().size());
    Assert.assertEquals(2,
            actualConfiguration.getDurations().get(0).getAmount());
    Assert.assertEquals(DurationUnit.HOUR,
            actualConfiguration.getDurations().get(0).getUnit());

}
项目:WBSAirback    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationCombinedDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 1 month 15 days 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(3, actualConfiguration.getDurations().size());

}
项目:WBSAirback    文件:TestExpiresFilter.java   
@Test
public void testParseExpiresConfigurationMonoDuration() {
    ExpiresFilter expiresFilter = new ExpiresFilter();
    ExpiresConfiguration actualConfiguration = expiresFilter.parseExpiresConfiguration("access plus 2 hours");

    Assert.assertEquals(StartingPoint.ACCESS_TIME,
            actualConfiguration.getStartingPoint());

    Assert.assertEquals(1, actualConfiguration.getDurations().size());
    Assert.assertEquals(2,
            actualConfiguration.getDurations().get(0).getAmount());
    Assert.assertEquals(DurationUnit.HOUR,
            actualConfiguration.getDurations().get(0).getUnit());

}