Пример #1
0
  @Test
  public void
      testSetDefaultGeolocSearchPlaceTypeWithNullOrEmptyValueShouldSettheDefaultPlaceTypeClassToNULL() {
    GisgraphyConfig gisgraphyConfig = new GisgraphyConfig();
    // set a value before testing
    gisgraphyConfig.setDefaultGeolocSearchPlaceType("TestEntity");
    assertEquals(TestEntity.class, GisgraphyConfig.defaultGeolocSearchPlaceTypeClass);
    gisgraphyConfig.setDefaultGeolocSearchPlaceType(" ");
    assertNull(GisgraphyConfig.defaultGeolocSearchPlaceTypeClass);

    gisgraphyConfig.setDefaultGeolocSearchPlaceType("City");
    gisgraphyConfig.setDefaultGeolocSearchPlaceType(null);
    assertNull(GisgraphyConfig.defaultGeolocSearchPlaceTypeClass);
  }
Пример #2
0
 @Test
 public void
     testSetDefaultGeolocSearchPlaceTypeWithWrongValueShouldSettheDefaultPlaceTypeClassToNULL() {
   GisgraphyConfig gisgraphyConfig = new GisgraphyConfig();
   gisgraphyConfig.setDefaultGeolocSearchPlaceType("NO");
   assertNull(GisgraphyConfig.defaultGeolocSearchPlaceTypeClass);
 }
Пример #3
0
 @Test
 public void testSetDefaultGeolocSearchPlaceTypeShouldBeCaseSensitive() {
   GisgraphyConfig gisgraphyConfig = new GisgraphyConfig();
   gisgraphyConfig.setDefaultGeolocSearchPlaceType("city");
   assertNull(GisgraphyConfig.defaultGeolocSearchPlaceTypeClass);
 }
Пример #4
0
 @Test
 public void testSetDefaultGeolocSearchPlaceTypeShouldReallySetTheClassAcordingToEntityPackage() {
   GisgraphyConfig gisgraphyConfig = new GisgraphyConfig();
   gisgraphyConfig.setDefaultGeolocSearchPlaceType("TestEntity");
   assertEquals(TestEntity.class, GisgraphyConfig.defaultGeolocSearchPlaceTypeClass);
 }