Repository: dotnet/aspnetcore
File: src/Components/Server/test/ProtectedBrowserStorageTest.cs (C#)

Code before:
    }

    class TestJSRuntime : IJSRuntime
    {
        public List<(string Identifier, object[] Args, JSCallType CallType)> Invocations { get; } = [];

        public object NextInvocationResult { get; set; }

        public ValueTask<TValue> InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken, object[] args)
        {
            Invocations.Add((identifier, args, JSCallType.FunctionCall));
            return (ValueTask<TValue>)NextInvocationResult;
        }

        public ValueTask<TValue> InvokeAsync<TValue>(string identifier, object[] args)
            => InvokeAsync<TValue>(identifier, cancellationToken: CancellationToken.None, args: args);

        public ValueTask<IJSObjectReference> InvokeConstructorAsync(string identifier, object[] args)
        {
            Invocations.Add((identifier, args, JSCallType.NewCall));
            return (ValueTask<IJSObjectReference>)NextInvocationResult;
        }

        public ValueTask<IJSObjectReference> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object[] args)
        {
            Invocations.Add((identifier, args, JSCallType.NewCall));
            return (ValueTask<IJSObjectReference>)NextInvocationResult;
        }

        public ValueTask<TValue> GetValueAsync<TValue>(string identifier)
        {
            Invocations.Add((identifier, [], JSCallType.GetValue));
            return (ValueTask<TValue>)NextInvocationResult;
        }

        public ValueTask<TValue> GetValueAsync<TValue>(string identifier, CancellationToken cancellationToken)
        {
            Invocations.Add((identifier, [], JSCallType.GetValue));
            return (ValueTask<TValue>)NextInvocationResult;
        }

        public ValueTask SetValueAsync<TValue>(string identifier, TValue value)
        {
            Invocations.Add((identifier, [value], JSCallType.SetValue));
            return ValueTask.CompletedTask;
        }

        public ValueTask SetValueAsync<TValue>(string identifier, TValue value, CancellationToken cancellationToken)
        {
            Invocations.Add((identifier, [value], JSCallType.SetValue));
            return ValueTask.CompletedTask;

Review comment (suggestion):
```suggestion
            Invocations.Add((identifier, args, JSCallType.ConstructorCall));
```

Code after:
    }

    class TestJSRuntime : IJSRuntime
    {
        public List<(string Identifier, object[] Args, JSCallType CallType)> Invocations { get; } = [];

        public object NextInvocationResult { get; set; }

        public ValueTask<TValue> InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken, object[] args)
        {
            Invocations.Add((identifier, args, JSCallType.FunctionCall));
            return (ValueTask<TValue>)NextInvocationResult;
        }

        public ValueTask<TValue> InvokeAsync<TValue>(string identifier, object[] args)
            => InvokeAsync<TValue>(identifier, cancellationToken: CancellationToken.None, args: args);

        public ValueTask<IJSObjectReference> InvokeConstructorAsync(string identifier, object[] args)
        {
            Invocations.Add((identifier, args, JSCallType.ConstructorCall));
            return (ValueTask<IJSObjectReference>)NextInvocationResult;
        }

        public ValueTask<IJSObjectReference> InvokeConstructorAsync(string identifier, CancellationToken cancellationToken, object[] args)
        {
            Invocations.Add((identifier, args, JSCallType.ConstructorCall));
            return (ValueTask<IJSObjectReference>)NextInvocationResult;
        }

        public ValueTask<TValue> GetValueAsync<TValue>(string identifier)
        {
            Invocations.Add((identifier, [], JSCallType.GetValue));
            return (ValueTask<TValue>)NextInvocationResult;
        }

        public ValueTask<TValue> GetValueAsync<TValue>(string identifier, CancellationToken cancellationToken)
        {
            Invocations.Add((identifier, [], JSCallType.GetValue));
            return (ValueTask<TValue>)NextInvocationResult;
        }

        public ValueTask SetValueAsync<TValue>(string identifier, TValue value)
        {
            Invocations.Add((identifier, [value], JSCallType.SetValue));
            return ValueTask.CompletedTask;
        }

        public ValueTask SetValueAsync<TValue>(string identifier, TValue value, CancellationToken cancellationToken)
        {
            Invocations.Add((identifier, [value], JSCallType.SetValue));
            return ValueTask.CompletedTask;