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

no.unit.nva.model.testing.associatedartifacts.AdministrativeAgreementGenerator Maven / Gradle / Ivy

There is a newer version: 0.23.2
Show newest version
package no.unit.nva.model.testing.associatedartifacts;

import static no.unit.nva.testutils.RandomDataGenerator.randomInstant;
import static no.unit.nva.testutils.RandomDataGenerator.randomInteger;
import static no.unit.nva.testutils.RandomDataGenerator.randomString;
import static no.unit.nva.testutils.RandomDataGenerator.randomUri;
import java.util.UUID;
import no.unit.nva.model.Username;
import no.unit.nva.model.associatedartifacts.file.AdministrativeAgreement;
import no.unit.nva.model.associatedartifacts.file.UploadDetails;

public final class AdministrativeAgreementGenerator {

    private AdministrativeAgreementGenerator() {
        // NO-OP
    }

    public static AdministrativeAgreement random() {
        return new AdministrativeAgreement(UUID.randomUUID(), randomString(), randomString(),
                                           randomInteger().longValue(), randomUri(), true, false, null,
                                           randomInserted());
    }

    private static UploadDetails randomInserted() {
        return new UploadDetails(randomUsername(), randomInstant());
    }

    private static Username randomUsername() {
        return new Username(randomString());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy