Class ProjectFormPanelTest

java.lang.Object
test.ProjectFormPanelTest

public class ProjectFormPanelTest extends Object
Unit tests for simple validation logic used by the project form.
  • Constructor Details

    • ProjectFormPanelTest

      public ProjectFormPanelTest()
      Public no-arg constructor for the test class.
  • Method Details

    • testInvalidDateFormat

      @Test void testInvalidDateFormat()
      Validate that malformed dates are rejected.
    • testSpecialCharactersInProjectName

      @Test void testSpecialCharactersInProjectName()
      Ensure project names with invalid characters are rejected.
    • testVeryLongProjectName

      @Test void testVeryLongProjectName()
      Ensure overly long project names are rejected.
    • testVeryLongDescription

      @Test void testVeryLongDescription()
      Ensure overly long project descriptions are rejected.
    • validateDate

      private boolean validateDate(String date)
      Validate date string uses yyyy-MM-dd and is not in the future.
      Parameters:
      date - the date string to validate
      Returns:
      true when valid
    • validateProjectName

      private boolean validateProjectName(String name)
      Validate project name characters and length.
      Parameters:
      name - the project name
      Returns:
      true when valid
    • validateDescription

      private boolean validateDescription(String description)
      Validate description length.
      Parameters:
      description - the project description
      Returns:
      true when within acceptable length