use of hudson.tasks.LogRotator in project hudson-2.x by hudson.
the class FreeStyleProjectTest method testSetLogRotatorParentNull.
@Test
public void testSetLogRotatorParentNull() {
FreeStyleProject childProject1 = new FreeStyleProjectMock("child1");
childProject1.setLogRotator(new LogRotator(10, 11, 12, 13));
assertNotNull(childProject1.getLogRotator());
assertEquals(childProject1.getLogRotator().getDaysToKeep(), 10);
}
use of hudson.tasks.LogRotator in project hudson-2.x by hudson.
the class FreeStyleProjectTest method testGetLogRotatorFromChild.
@Test
public void testGetLogRotatorFromChild() {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setLogRotator(new LogRotator(10, 10, 10, 10));
FreeStyleProjectMock childProject1 = new FreeStyleProjectMock("child1");
childProject1.setLogRotator(new LogRotator(20, 20, 20, 20));
childProject1.setCascadingProject(parentProject);
LogRotator result = childProject1.getLogRotator();
assertNotNull(result);
assertEquals(result.getDaysToKeep(), 20);
}
use of hudson.tasks.LogRotator in project hudson-2.x by hudson.
the class ProjectPropertyTest method testLogRotatorProjectPropertyPrepareValue.
@Test
public void testLogRotatorProjectPropertyPrepareValue() {
//Boolean property acts as BaseProperty
BaseProjectProperty property = new LogRotatorProjectProperty(project);
assertNull(property.prepareValue(null));
LogRotator value = new LogRotator(1, 1, 1, 1);
assertEquals(value, property.prepareValue(value));
}
Aggregations