com.chutneytesting.design.api.scenario.compose.dto.ComposableTestCaseDto Maven / Gradle / Ivy
package com.chutneytesting.design.api.scenario.compose.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 = ImmutableComposableTestCaseDto.class)
@JsonDeserialize(as = ImmutableComposableTestCaseDto.class)
@Value.Style(jdkOnly = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public interface ComposableTestCaseDto {
Optional id();
String title();
Optional description();
@Value.Default()
default Instant creationDate() {
return now();
}
List tags();
ComposableScenarioDto scenario();
Optional datasetId();
@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 executionParameters() {
return emptyList();
}
@Value.Immutable
@JsonSerialize(as = ImmutableComposableScenarioDto.class)
@JsonDeserialize(as = ImmutableComposableScenarioDto.class)
@Value.Style(jdkOnly = true)
@JsonIgnoreProperties(ignoreUnknown = true)
interface ComposableScenarioDto {
@Value.Default()
default List parameters() {
return emptyList();
}
@Value.Default
default List componentSteps() {
return emptyList();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy