package com.oguerreiro.resilient.domain;

import java.util.Random;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class InputDataUploadTestSamples {

    private static final Random random = new Random();
    private static final AtomicLong longCount = new AtomicLong(random.nextInt() + (2 * Integer.MAX_VALUE));
    private static final AtomicInteger intCount = new AtomicInteger(random.nextInt() + (2 * Short.MAX_VALUE));

    public static InputDataUpload getInputDataUploadSample1() {
        return new InputDataUpload()
            .id(1L)
            .title("title1")
            .uploadFileName("uploadFileName1")
            .diskFileName("diskFileName1")
            .comments("comments1")
            .creationUsername("creationUsername1")
            .version(1);
    }

    public static InputDataUpload getInputDataUploadSample2() {
        return new InputDataUpload()
            .id(2L)
            .title("title2")
            .uploadFileName("uploadFileName2")
            .diskFileName("diskFileName2")
            .comments("comments2")
            .creationUsername("creationUsername2")
            .version(2);
    }

    public static InputDataUpload getInputDataUploadRandomSampleGenerator() {
        return new InputDataUpload()
            .id(longCount.incrementAndGet())
            .title(UUID.randomUUID().toString())
            .uploadFileName(UUID.randomUUID().toString())
            .diskFileName(UUID.randomUUID().toString())
            .comments(UUID.randomUUID().toString())
            .creationUsername(UUID.randomUUID().toString())
            .version(intCount.incrementAndGet());
    }
}
