https://github.com/lucasgianine/java-running-tests
🧪 Running automated tests with Java for the Programming Language discipline at the @Bandtec (@Britooo teacher)
https://github.com/lucasgianine/java-running-tests
automated-testing programming-language unit-testing
Last synced: 6 months ago
JSON representation
🧪 Running automated tests with Java for the Programming Language discipline at the @Bandtec (@Britooo teacher)
- Host: GitHub
- URL: https://github.com/lucasgianine/java-running-tests
- Owner: lucasgianine
- Created: 2023-10-24T23:05:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T00:09:48.000Z (over 1 year ago)
- Last Synced: 2025-03-26T11:12:26.353Z (10 months ago)
- Topics: automated-testing, programming-language, unit-testing
- Language: Java
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🧪 ListaUtil Testing Framework
A Java-based testing framework for integer list operations, designed for automated unit testing using JUnit.
## Overview
`ListaUtil` is a utility class for managing a dynamic list of integers, providing methods for adding, removing, and analyzing list contents. `ListaUtilTest` includes a suite of JUnit tests that validate all functionalities of `ListaUtil` under various conditions.
## Key Components
- **`ListaUtil`**: Manages a list of integers with methods to add, remove, and perform calculations such as counting, summing, and finding the max and min values.
- **`ListaUtilTest`**: Implements JUnit tests to ensure `ListaUtil` functions as expected. Each method in `ListaUtil` is covered by multiple tests to validate its correctness across different scenarios.
## About repo

### Features
- **Add/Remove Operations**: Safely add and remove integers, with special handling for `null` values.
- **Aggregate Information**: Count total, even, and odd integers.
- **Mathematical Calculations**: Sum integers and find the largest and smallest values in the list.
- **Duplication Check**: Determine whether the list contains any duplicate integers.
- **Comprehensive Testing**: Each operation is rigorously tested to ensure reliability and accuracy.
## Test Descriptions
- **`add()` Tests**: Validate that adding integers (both positive and negative) updates the list size appropriately and that adding `null` does not affect the list.
- **`remove()` Tests**: Ensure that removing an integer adjusts the list size correctly, and that removing `null` or non-existent values does not alter the list size.
- **`count()` Tests**: Check the count functionality for both empty and populated lists.
- **`countPares()` and `countImpares()` Tests**: Verify counting of even and odd numbers in various list states.
- **`somar()` Tests**: Assess the sum function with different sets of integers.
- **`getMaior()` and `getMenor()` Tests**: Test for correct identification of the largest and smallest integers.
- **`hasDuplicidade()` Tests**: Check for duplicate values in the list to ensure the function accurately identifies duplicates or the absence thereof.
## Usage
Integrate `ListaUtil` into any Java project where integer list management is needed. Use `ListaUtilTest` to validate functionality or as a reference for writing further tests with JUnit.