Пример #1
0
 @Test
 public void htmlWithinRadarRange() {
   Zone zone =
       createZone(
           1,
           1,
           ZoneDanger.FIVE_PLUS,
           -1,
           true,
           true,
           true,
           new ArrayList<Item>(),
           null,
           null,
           null,
           0);
   assertEquals(2, zone.getHtmlClasses().length);
   assertEquals("danger3", zone.getHtmlClasses()[0]);
   assertEquals("zone", zone.getHtmlClasses()[1]);
 }
Пример #2
0
 @Test
 public void htmlTown() {
   Zone zone =
       createZone(
           0,
           0,
           ZoneDanger.UNKNOWN,
           3,
           true,
           true,
           true,
           new ArrayList<Item>(),
           "Huge Well",
           "2011-08-04 12:30:15",
           "Fred",
           8);
   assertEquals(2, zone.getHtmlClasses().length);
   assertEquals("town", zone.getHtmlClasses()[0]);
   assertEquals("zone", zone.getHtmlClasses()[1]);
 }
Пример #3
0
 @Test
 public void htmlNvt() {
   Zone zone =
       createZone(
           1,
           1,
           ZoneDanger.UNKNOWN,
           -1,
           true,
           true,
           true,
           new ArrayList<Item>(),
           null,
           null,
           null,
           0);
   zone.setDiscoveredNotVisitedToday(true);
   zone.setDiscoveryStatus(DiscoveryStatus.DISCOVERED_NOT_VISITED_TODAY);
   assertEquals(2, zone.getHtmlClasses().length);
   assertEquals("nvt", zone.getHtmlClasses()[0]);
   assertEquals("zone", zone.getHtmlClasses()[1]);
 }
Пример #4
0
 @Test
 public void htmlWithBuilding() {
   Zone zone =
       createZone(
           1,
           1,
           ZoneDanger.FIVE_PLUS,
           -1,
           true,
           true,
           true,
           new ArrayList<Item>(),
           null,
           null,
           null,
           0);
   OutsideBuilding building = new OutsideBuilding();
   zone.setBuilding(building);
   assertEquals(3, zone.getHtmlClasses().length);
   assertEquals("danger3", zone.getHtmlClasses()[0]);
   assertEquals("building", zone.getHtmlClasses()[1]);
   assertEquals("zone", zone.getHtmlClasses()[2]);
 }