Skip to content
Open
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
2 changes: 1 addition & 1 deletion testing-unit-fs-mocks/Testing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
interface IMocks with
member this.NewResourceAsync(args: MockResourceArgs): Task<ValueTuple<string,obj>> =
let inputKVs = args.Inputs |> Seq.map(fun kv -> kv.Key, kv.Value) |> Seq.toList
let nameKVs = if args.Inputs.ContainsKey("name") then [] else [("name", args.Name :> obj)]

Check warning on line 15 in testing-unit-fs-mocks/Testing.fs

View workflow job for this annotation

GitHub Actions / .NET unit tests (testing-unit-fs-mocks)

Nullness warning: The types 'obj' and 'string | null' do not have compatible nullability.
let endpointKVs =
if args.Type = "azure:storage/account:Account"
then ["primaryWebEndpoint", sprintf "https://%s.web.core.windows.net" args.Name :> obj]
Expand All @@ -26,10 +26,10 @@
let dict = outputs.ToImmutableDictionary() :> obj

// Default the resource ID to `{name}_id`.
let id = if args.Id = null then sprintf "%s_id" args.Name else args.Id

Check warning on line 29 in testing-unit-fs-mocks/Testing.fs

View workflow job for this annotation

GitHub Actions / .NET unit tests (testing-unit-fs-mocks)

Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression.

Check warning on line 29 in testing-unit-fs-mocks/Testing.fs

View workflow job for this annotation

GitHub Actions / .NET unit tests (testing-unit-fs-mocks)

Nullness warning: The types 'string' and 'string | null' do not have compatible nullability.

Check warning on line 29 in testing-unit-fs-mocks/Testing.fs

View workflow job for this annotation

GitHub Actions / .NET unit tests (testing-unit-fs-mocks)

Nullness warning: The types 'string' and 'string | null' do not have compatible nullability.
Task.FromResult(struct (id, dict))

member this.CallAsync(args: MockCallArgs): Task<obj> =
// We don't use this method in this particular test suite.
// Default to returning whatever we got as input.
Task.FromResult(null :> obj)
Task.FromResult(null)

Check warning on line 35 in testing-unit-fs-mocks/Testing.fs

View workflow job for this annotation

GitHub Actions / .NET unit tests (testing-unit-fs-mocks)

Nullness warning: The type 'obj' does not support 'null'.
Loading