예제 #1
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithBlankValue() {
    final String value = BLANK;

    LOGGER.entering(this.getClass().getName(), "testIsNotValidIrideIdentityWithBlankValue", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithBlankValue");
    }
  }
예제 #2
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMacBlank() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/" + BLANK;

    LOGGER.entering(this.getClass().getName(), "testIsNotValidIrideIdentityWithMacBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithMacBlank");
    }
  }
예제 #3
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotInvalidIrideIdentity() {
    final String value =
        "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(this.getClass().getName(), "testIsNotInvalidIrideIdentity", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(false));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotInvalidIrideIdentity");
    }
  }
예제 #4
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMissingNomeToken() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithMissingNomeToken", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithMissingNomeToken");
    }
  }
예제 #5
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithUnrecognizedValue() {
    final String value = "UNRECOGNIZED_VALUE";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithUnrecognizedValue", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithUnrecognizedValue");
    }
  }
예제 #6
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithAllEmptyTokens() {
    final String value =
        EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY;

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithAllEmptyTokens", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithAllEmptyTokens");
    }
  }
예제 #7
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithTimestampBlank() {
    final String value =
        "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/" + BLANK + "/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithTimestampBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithTimestampBlank");
    }
  }
예제 #8
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithCodiceFiscaleBlank() {
    final String value =
        BLANK + "/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithCodiceFiscaleBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(), "testIsNotValidIrideIdentityWithCodiceFiscaleBlank");
    }
  }
예제 #9
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2";

    LOGGER.entering(
        this.getClass().getName(),
        "testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken",
        value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(),
          "testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken");
    }
  }
예제 #10
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty() {
    final String value =
        "AAAAAA00011D000L/" + EMPTY + "/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(),
        "testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty",
        value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(),
          "testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty");
    }
  }