Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Validation

Project Description

This project is a Java Maven application that validates passwords according to a defined password policy. The project was developed using Test-Driven Development (TDD) with JUnit 5 and is automatically tested using GitHub Actions.

Password Policy

A valid password must:

  • Be at least 8 characters long.
  • Contain at least one digit (0-9).
  • Contain at least one uppercase letter.
  • Contain at least one lowercase letter.
  • Not be a common password.

Allowed special characters:

!@#$%^&*()-_+=?.,;:

Features

  • Minimum length validation
  • Digit validation
  • Uppercase and lowercase validation
  • Common password detection
  • Contain at least one allowed special character.
  • Overall password validation (isValid)

Technologies

  • Java 25
  • Maven
  • JUnit 5
  • Git
  • GitHub
  • GitHub Actions

Project Structure

src
 ├── main
 │    └── PasswordValidator.java
 └── test
      └── PasswordValidatorTest.java

Build and Test

Run all tests:

mvn clean verify

Create the JAR file:

mvn package

Continuous Integration (CI)

GitHub Actions automatically builds and tests the project on every push and pull request to the main branch.


Example Usage

boolean valid = PasswordValidator.isValid("Password1!");

System.out.println(valid);

Output:

true

Test-Driven Development (TDD)

The project was implemented using the Red-Green-Refactor cycle:

  1. Write a failing test.
  2. Implement the minimum code.
  3. Refactor while keeping all tests green.

Author

Mohammad Aziz

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages