Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions validation_packages/ena/ena@1.0.0.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,16 +454,6 @@ type Validate.ParamCollection with
|> Expecto.Tests.failtestNoStackf "%s"


cdTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> fun v -> cdRegex.Match(v).Success
)

cdTokens[1 ..] |> List.map Param.getValueAsString
cdTokens


// Validation Cases:
let studyCases =
testList STDMSO.``Study Metadata``.STUDY.key.Name [
Expand All @@ -483,8 +473,7 @@ let studyCases =

// Study has collection date with valid values in process graph. Values are valid when they match the collection date Regex above
ARCExpect.validationCase (TestID.Name "collection date values are valid") {
cdTokens
|> List.skip 1
cdTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> fun v -> cdRegex.Match(v).Success
Expand All @@ -499,8 +488,7 @@ let studyCases =

// Study has geographic location (country and/or sea) with valid values in process graph. Values are valid when they match one of the given values above
ARCExpect.validationCase (TestID.Name "geographic location (country and/or sea) values are valid") {
glcaosTokens
|> List.skip 1
glcaosTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> fun v -> Array.contains v glcaosValues
Expand All @@ -515,8 +503,7 @@ let studyCases =

// Study has geographic location (latitude) with valid values in process graph. Values are valid when they match the geographic location Regex for longitude and latitude above
ARCExpect.validationCase (TestID.Name "geographic location (latitude) values are valid") {
gllaTokens
|> List.skip 1
gllaTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> fun v -> gllRegex.Match(v).Success
Expand All @@ -531,8 +518,7 @@ let studyCases =

// Study has geographic location (longitude) with valid values in process graph. Values are valid when they match the geographic location Regex for longitude and latitude above
ARCExpect.validationCase (TestID.Name "geographic location (longitude) values are valid") {
glloTokens
|> List.skip 1
glloTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> fun v -> gllRegex.Match(v).Success
Expand All @@ -547,8 +533,7 @@ let studyCases =

// Study has plant growth medium with not-empty values in process graph
ARCExpect.validationCase (TestID.Name "plant growth medium values are not empty") {
pgmTokens
|> List.skip 1
pgmTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> System.String.IsNullOrEmpty
Expand All @@ -564,8 +549,7 @@ let studyCases =

// Study has isolation and growth condition with not-empty values in process graph
ARCExpect.validationCase (TestID.Name "isolation and growth condition values are not empty") {
iagcTokens
|> List.skip 1
iagcTokens[1 ..]
|> Validate.ParamCollection.AllTermsSatisfyPredicate (
Param.getValueAsString
>> System.String.IsNullOrEmpty
Expand Down