Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="JsonProvider.fs" />
<Compile Include="XmlProvider.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions tests/FSharp.Data.Reference.Tests/XmlProvider.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module FSharp.Data.Reference.Tests.XmlProvider

open NUnit.Framework
open FsUnit

[<Test>]
let ``GetSchema works for XmlProvider with Schema and EmbeddedResource`` () =
let schema = FSharp.Data.Tests.XmlProvider.XmlSchemaWithEmbeddedResource.GetSchema()
schema.Count |> should equal 1
4 changes: 4 additions & 0 deletions tests/FSharp.Data.Tests/XmlProvider.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1312,3 +1312,7 @@ let ``Inline schemas as overrides replace value-based inference when present`` (
sample[1].Value.GetType() |> should equal (typeof<int option>)
// (Note the types in the inline schemas are automatically transformed to options as needed
// when another node does not define any value for the given property)

// Used by FSharp.Data.Reference.Tests to verify that GetSchema works with EmbeddedResource
type XmlSchemaWithEmbeddedResource =
XmlProvider<Schema = "Data/po.xsd", EmbeddedResource = "FSharp.Data.Tests, FSharp.Data.Tests.Data.po.xsd">