All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wesleyhome.test.jupiter.MyArguments Maven / Gradle / Ivy

Go to download

Library to help generate test parameter permutations for parameterized tests in JUnit. This version is an initial attempt to convert to building with Gradle.

There is a newer version: 3.0.0
Show newest version
package com.wesleyhome.test.jupiter;

import org.junit.jupiter.params.provider.Arguments;
import org.junit.platform.commons.util.ToStringBuilder;

import java.util.Arrays;

class MyArguments implements Arguments {

    private final Object[] arguments;

    MyArguments(Object[] arguments) {
        this.arguments = arguments;
    }

    @Override
    public Object[] get() {
        return arguments;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj instanceof Arguments) {
            Arguments that = (Arguments) obj;
            return Arrays.equals(this.get(), that.get());
        }
        return false;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(MyArguments.class).append("arguments", arguments).toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy