From 28969a4ac01d4797e800756388cfcdbc1e9c7b46 Mon Sep 17 00:00:00 2001 From: Caroline Ott Date: Tue, 8 Oct 2024 16:55:41 +0200 Subject: [PATCH] rename Type to Type_ for fable --- src/CWL/Inputs.fs | 2 +- src/CWL/Outputs.fs | 2 +- tests/CWL/CWLObject.Tests.fs | 8 ++++---- tests/CWL/CWLObjectMetadata.Tests.fs | 8 ++++---- tests/CWL/Inputs.Tests.fs | 6 +++--- tests/CWL/Outputs.Tests.fs | 10 +++++----- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/CWL/Inputs.fs b/src/CWL/Inputs.fs index 4493dce7..360dbcef 100644 --- a/src/CWL/Inputs.fs +++ b/src/CWL/Inputs.fs @@ -23,7 +23,7 @@ module Inputs = DynObj.setOptionalProperty ("type") type_ this DynObj.setOptionalProperty ("inputBinding") inputBinding this member this.Name = name - member this.Type = DynObj.tryGetTypedPropertyValue ("type") this + member this.Type_ = DynObj.tryGetTypedPropertyValue ("type") this member this.InputBinding = DynObj.tryGetTypedPropertyValue ("inputBinding") this module Workflow = diff --git a/src/CWL/Outputs.fs b/src/CWL/Outputs.fs index 50991512..0b63b4fc 100644 --- a/src/CWL/Outputs.fs +++ b/src/CWL/Outputs.fs @@ -19,7 +19,7 @@ module Outputs = DynObj.setOptionalProperty ("type") type_ this DynObj.setOptionalProperty ("outputBinding") outputBinding this member this.Name = name - member this.Type = DynObj.tryGetTypedPropertyValue ("type") this + member this.Type_ = DynObj.tryGetTypedPropertyValue ("type") this member this.OutputBinding = DynObj.tryGetTypedPropertyValue ("outputBinding") this module Workflow = diff --git a/tests/CWL/CWLObject.Tests.fs b/tests/CWL/CWLObject.Tests.fs index 623f2078..197e24d4 100644 --- a/tests/CWL/CWLObject.Tests.fs +++ b/tests/CWL/CWLObject.Tests.fs @@ -80,7 +80,7 @@ let testCWLToolDescription = "Name of input is not 'firstArg'" testCase "Type" <| fun _ -> let expected = File (FileInstance()) - let actual = fileItem.Type.Value + let actual = fileItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -101,7 +101,7 @@ let testCWLToolDescription = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = String - let actual = stringItem.Type.Value + let actual = stringItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -131,7 +131,7 @@ let testCWLToolDescription = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = Directory (DirectoryInstance()) - let actual = directoryItem.Type.Value + let actual = directoryItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -152,7 +152,7 @@ let testCWLToolDescription = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = File (FileInstance()) - let actual = fileItem.Type.Value + let actual = fileItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" diff --git a/tests/CWL/CWLObjectMetadata.Tests.fs b/tests/CWL/CWLObjectMetadata.Tests.fs index b6771bf5..f93805dd 100644 --- a/tests/CWL/CWLObjectMetadata.Tests.fs +++ b/tests/CWL/CWLObjectMetadata.Tests.fs @@ -81,7 +81,7 @@ let testCWLToolDescriptionMetadata = "Name of input is not 'firstArg'" testCase "Type" <| fun _ -> let expected = File (FileInstance()) - let actual = fileItem.Type.Value + let actual = fileItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -102,7 +102,7 @@ let testCWLToolDescriptionMetadata = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = String - let actual = stringItem.Type.Value + let actual = stringItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -132,7 +132,7 @@ let testCWLToolDescriptionMetadata = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = Directory (DirectoryInstance()) - let actual = directoryItem.Type.Value + let actual = directoryItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -153,7 +153,7 @@ let testCWLToolDescriptionMetadata = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = File (FileInstance()) - let actual = fileItem.Type.Value + let actual = fileItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" diff --git a/tests/CWL/Inputs.Tests.fs b/tests/CWL/Inputs.Tests.fs index 8a7aabb1..92afcc37 100644 --- a/tests/CWL/Inputs.Tests.fs +++ b/tests/CWL/Inputs.Tests.fs @@ -18,12 +18,12 @@ let testInput = testList "Directory" [ let directoryItem = decodeInput.[0] testCase "Name" <| fun _ -> Expect.isTrue ("arcDirectory" = directoryItem.Name) "Name of input is not 'arcDirectory'" - testCase "Type" <| fun _ -> Expect.isTrue ((Directory (DirectoryInstance())) = directoryItem.Type.Value) "Type of input is not Directory" + testCase "Type" <| fun _ -> Expect.isTrue ((Directory (DirectoryInstance())) = directoryItem.Type_.Value) "Type of input is not Directory" ] testList "File" [ let fileItem = decodeInput.[1] testCase "Name" <| fun _ -> Expect.isTrue ("firstArg" = fileItem.Name) "Name of input is not 'firstArg'" - testCase "Type" <| fun _ -> Expect.isTrue ((File (FileInstance())) = fileItem.Type.Value) "Type of input is not File" + testCase "Type" <| fun _ -> Expect.isTrue ((File (FileInstance())) = fileItem.Type_.Value) "Type of input is not File" testCase "InputBinding" <| fun _ -> Expect.isTrue (Some {Position = Some 1; Prefix = Some "--example"; ItemSeparator = None; Separate = None} = fileItem.InputBinding) "InputBinding of input is not Some Pattern" ] testList "String" [ @@ -31,7 +31,7 @@ let testInput = testCase "Name" <| fun _ -> Expect.isTrue ("secondArg" = stringItem.Name) "Name of input is not 'secondArg'" testCase "Type" <| fun _ -> let expected = String - let actual = stringItem.Type.Value + let actual = stringItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" diff --git a/tests/CWL/Outputs.Tests.fs b/tests/CWL/Outputs.Tests.fs index f4c331b3..be3d161a 100644 --- a/tests/CWL/Outputs.Tests.fs +++ b/tests/CWL/Outputs.Tests.fs @@ -29,7 +29,7 @@ let testOutput = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = File (FileInstance()) - let actual = fileItem.Type.Value + let actual = fileItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -50,7 +50,7 @@ let testOutput = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = Directory (DirectoryInstance()) - let actual = directoryItem.Type.Value + let actual = directoryItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -71,7 +71,7 @@ let testOutput = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = Directory (DirectoryInstance()) - let actual = directoryItem.Type.Value + let actual = directoryItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -92,7 +92,7 @@ let testOutput = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = Array (File (FileInstance())) - let actual = fileArrayItem.Type.Value + let actual = fileArrayItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}" @@ -113,7 +113,7 @@ let testOutput = $"Expected: {expected}\nActual: {actual}" testCase "Type" <| fun _ -> let expected = Array (File (FileInstance())) - let actual = fileArrayItem.Type.Value + let actual = fileArrayItem.Type_.Value Expect.isTrue (expected = actual) $"Expected: {expected}\nActual: {actual}"