Skip to content

Commit

Permalink
Fix broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Mar 18, 2022
1 parent 3d543e9 commit 23ed314
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Blazor.SourceGenerators.Tests;
public class LibDomParserInterfacesTests
{
[Fact]
public void CorrectlyConvertsTypeScriptInterfaceToCSharpRecord()
public void CorrectlyConvertsTypeScriptInterfaceToCSharpClass()
{
var text = @"interface MediaKeySystemConfiguration {
audioCapabilities?: MediaKeySystemMediaCapability[];
Expand All @@ -24,16 +24,25 @@ public void CorrectlyConvertsTypeScriptInterfaceToCSharpRecord()
var sut = new LibDomParser();
var actual = sut.ToObject(text);
var expected = @"#nullable enable
using System.Text.Json.Serialization;
namespace Microsoft.JSInterop;
public class MediaKeySystemConfiguration
{
[JsonPropertyName(""audioCapabilities"")]
public MediaKeySystemMediaCapability[]? AudioCapabilities { get; set; } = default!;
[JsonPropertyName(""distinctiveIdentifier"")]
public MediaKeysRequirement? DistinctiveIdentifier { get; set; } = default!;
[JsonPropertyName(""initDataTypes"")]
public string[]? InitDataTypes { get; set; } = default!;
[JsonPropertyName(""label"")]
public string? Label { get; set; } = default!;
[JsonPropertyName(""persistentState"")]
public MediaKeysRequirement? PersistentState { get; set; } = default!;
[JsonPropertyName(""sessionTypes"")]
public string[]? SessionTypes { get; set; } = default!;
[JsonPropertyName(""videoCapabilities"")]
public MediaKeySystemMediaCapability[]? VideoCapabilities { get; set; } = default!;
}
";
Expand Down

0 comments on commit 23ed314

Please sign in to comment.