Skip to content

Latest commit

 

History

History
74 lines (60 loc) · 2.61 KB

README.md

File metadata and controls

74 lines (60 loc) · 2.61 KB

TestUtils

A couple of useful simple test utility classes

license

This is a collection of simple test utility classes

Table of Contents

  1. Features
  2. Requirements
  3. Dependencies
  4. Usage

Features

  1. PerformanceEvaluator: Quickly evaluate the performance of your code.
  2. ObjectExtractor: Quickly extract objects from test resource folders

Requirements

  • Java version 17 and above

Dependencies

Add the following dependency to your pom.xml:

<dependency>
    <groupId>com.livetheoogway.commons</groupId>
    <artifactId>testutils</artifactId>
    <version>1.0</version>
</dependency>

Usage

// In order to run an operation 100 times and evaluate its performance, use the PerformanceEvaluator
PerformanceEvaluator performanceEvaluator = new PerformanceEvaluator();
performanceEvaluator.evaluate(100, () -> {
    // your code here
});

// in order to extract an object from a test resource folder, use the ObjectExtractor
ObjectExtractor objectExtractor = new ObjectExtractor();
objectExtractor.extract("path/to/resource/file", SomeClass.class);