ExampleModelRecord

PackageFsLiveDocs.Core
Represents an executable code example extracted from documentation.

Fields

NameTypeDescription
CreateExampleModel.Create(name, content, expectedOutput, scenario, ?isSnapshotTest, ?noCheckReason)Create an example record from its individual fields.
NameNameThe unique name of the example, used for transclusion.
ContentContentThe raw F# code content.
ExpectedOutputExpectedOutputOptional expected output to verify against during testing.
ScenarioScenarioOptional scenario name to provide mocks/DI for this example.
IsSnapshotTestIsSnapshotTestWhether this example should be picked up by the generated snapshot test project.
NoCheckReasonNoCheckReasonWhy this example is deliberately excluded from verification, if it is.

Examples

CreateExample

> ExampleModel.Create("Basic Usage", "1+1", Some "2", None);;
val it: ExampleModel = { Name = "Basic Usage"
  Content = "1+1"
  ExpectedOutput = Some "2"
  Scenario = None
  IsSnapshotTest = false
  NoCheckReason = None }