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

com.chutneytesting.design.api.scenario.v2_0.dto.RawTestCaseDto Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package com.chutneytesting.design.api.scenario.v2_0.dto;

import static java.time.Instant.now;
import static java.util.Collections.emptyList;

import com.chutneytesting.security.domain.User;
import com.chutneytesting.tools.ui.KeyValue;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.time.Instant;
import java.util.List;
import java.util.Optional;
import org.immutables.value.Value;

@Value.Immutable
@JsonSerialize(as = ImmutableRawTestCaseDto.class)
@JsonDeserialize(as = ImmutableRawTestCaseDto.class)
@Value.Style(jdkOnly = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public interface RawTestCaseDto {

    @JsonProperty("content")
    String scenario();

    Optional id();

    String title();

    Optional description();

    List tags();

    @Value.Default()
    default Instant creationDate() {
        return now();
    }

    @Value.Default()
    default String author() {
        return User.ANONYMOUS.id;
    }

    @Value.Default()
    default Instant updateDate() {
        return now();
    }

    @Value.Default()
    default Integer version() {
        return 1;
    }

    @Value.Default()
    @JsonProperty("computedParameters")
    default List parameters() {
        return emptyList();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy