Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace FluentAssertions in some tests #708

Closed
wants to merge 1 commit into from
Closed
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
@@ -1,4 +1,3 @@
using FluentAssertions;
using Xunit;

namespace Meziantou.AspNetCore.Components.LogViewer.Tests;
Expand All @@ -14,27 +13,27 @@ private static string Highlight(string str, params ILogHighlighter[] logHighligh
public void SingleMatchInMiddle()
{
var result = Highlight("a http://test.com b", new UrlLogHighlighter());
result.Should().Be("a <a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a> b");
Assert.Equal("a <a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a> b", result);
}

[Fact]
public void SingleMatchAtEnd()
{
var result = Highlight("a http://test.com", new UrlLogHighlighter());
result.Should().Be("a <a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a>");
Assert.Equal("a <a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a>", result);
}

[Fact]
public void SingleMatchAtStart()
{
var result = Highlight("http://test.com b", new UrlLogHighlighter());
result.Should().Be("<a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a> b");
Assert.Equal("<a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a> b", result);
}

[Fact]
public void MultipleMatches()
{
var result = Highlight("a http://test.com 'sample' b", new UrlLogHighlighter(), new QuoteLogHighlighter());
result.Should().Be("a <a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a> &#x27;<span scope class='log-message-match'>sample</span>&#x27; b");
Assert.Equal("a <a scope class='log-message-match-link' target='_blank' href='http://test.com'>http://test.com</a> &#x27;<span scope class='log-message-match'>sample</span>&#x27; b", result);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Xunit;

Expand All @@ -18,11 +17,11 @@
#pragma warning restore CA1848

var log = provider.Logs.Informations.Single();
log.Message.Should().Be("Test");
log.State.Should().BeEquivalentTo(new[] { KeyValuePair.Create<string, object>("{OriginalFormat}", "Test") });
log.Scopes.Should().BeEquivalentTo(Array.Empty<object>());
Assert.Equal("Test", log.Message);
Assert.Collection(log.State, item => Assert.Equal(new KeyValuePair<string, object>("{OriginalFormat}", "Test"), item));

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 21 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Assert.Empty(log.Scopes);

log.ToString().Should().Be("[my_category] Information: Test\n => [{\"Key\":\"{OriginalFormat}\",\"Value\":\"Test\"}]");
Assert.Equal("[my_category] Information: Test\n => [{\"Key\":\"{OriginalFormat}\",\"Value\":\"Test\"}]", log.ToString());
}

[Fact]
Expand All @@ -39,11 +38,15 @@
}

var log = provider.Logs.Informations.Single();
log.Message.Should().Be("Test 1");
log.State.Should().BeEquivalentTo(new[] { KeyValuePair.Create<string, object>("Number", 1), KeyValuePair.Create<string, object>("{OriginalFormat}", "Test {Number}") });
log.Scopes.Should().BeEquivalentTo(new object[] { new { Age = 52, Name = "John" }, new { Name = "test" } });

log.ToString().Should().Be("[my_category] Information: Test 1\n => [{\"Key\":\"Number\",\"Value\":1},{\"Key\":\"{OriginalFormat}\",\"Value\":\"Test {Number}\"}]\n => {\"Name\":\"test\"}\n => {\"Age\":52,\"Name\":\"John\"}");
Assert.Equal("Test 1", log.Message);
Assert.Collection(log.State,

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 42 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.
item => Assert.Equal(new KeyValuePair<string, object>("Number", 1), item),
item => Assert.Equal(new KeyValuePair<string, object>("{OriginalFormat}", "Test {Number}"), item));
Assert.Collection(log.Scopes,
item => Assert.Equal(new { Age = 52, Name = "John" }, item),
item => Assert.Equal(new { Name = "test" }, item));

Assert.Equal("[my_category] Information: Test 1\n => [{\"Key\":\"Number\",\"Value\":1},{\"Key\":\"{OriginalFormat}\",\"Value\":\"Test {Number}\"}]\n => {\"Name\":\"test\"}\n => {\"Age\":52,\"Name\":\"John\"}", log.ToString());
}

[Fact]
Expand All @@ -58,25 +61,29 @@
}

var log = provider.Logs.Informations.Single();
log.Message.Should().Be("Test 1");
log.State.Should().BeEquivalentTo(new[] { KeyValuePair.Create<string, object>("Number", 1), KeyValuePair.Create<string, object>("{OriginalFormat}", "Test {Number}") });
log.Scopes.Should().BeEquivalentTo(new object[] { new { Age = 52, Name = "John" }, new { Name = "test" } });
Assert.Equal("Test 1", log.Message);
Assert.Collection(log.State,

Check failure on line 65 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 65 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 65 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 65 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 65 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Check failure on line 65 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

The type arguments for method 'Assert.Collection<T>(IAsyncEnumerable<T>, params Action<T>[])' cannot be inferred from the usage. Try specifying the type arguments explicitly.
item => Assert.Equal(new KeyValuePair<string, object>("Number", 1), item),
item => Assert.Equal(new KeyValuePair<string, object>("{OriginalFormat}", "Test {Number}"), item));
Assert.Collection(log.Scopes,
item => Assert.Equal(new { Age = 52, Name = "John" }, item),
item => Assert.Equal(new { Name = "test" }, item));

log.ToString().Should().Be("[my_category] Information (1 Sample Event Id): Test 1\n => [{\"Key\":\"Number\",\"Value\":1},{\"Key\":\"{OriginalFormat}\",\"Value\":\"Test {Number}\"}]\n => {\"Name\":\"test\"}\n => {\"Age\":52,\"Name\":\"John\"}");
Assert.Equal("[my_category] Information (1 Sample Event Id): Test 1\n => [{\"Key\":\"Number\",\"Value\":1},{\"Key\":\"{OriginalFormat}\",\"Value\":\"Test {Number}\"}]\n => {\"Name\":\"test\"}\n => {\"Age\":52,\"Name\":\"John\"}", log.ToString());

log.TryGetParameterValue("{OriginalFormat}", out var format).Should().BeTrue();
format.Should().Be("Test {Number}");
Assert.True(log.TryGetParameterValue("{OriginalFormat}", out var format));
Assert.Equal("Test {Number}", format);

log.TryGetParameterValue("Name", out var name).Should().BeTrue();
name.Should().Be("test");
Assert.True(log.TryGetParameterValue("Name", out var name));
Assert.Equal("test", name);

log.TryGetParameterValue("Number", out var number).Should().BeTrue();
number.Should().Be(1);
Assert.True(log.TryGetParameterValue("Number", out var number));
Assert.Equal(1, number);

log.TryGetParameterValue("Age", out var age).Should().BeTrue();
age.Should().Be(52);
Assert.True(log.TryGetParameterValue("Age", out var age));
Assert.Equal(52, age);

log.GetAllParameterValues("Name").Should().Equal(["test", "John"]);
Assert.Equal(new object[] { "test", "John" }, log.GetAllParameterValues("Name").ToArray());
}

[LoggerMessage(Level = LogLevel.Information, Message = "Value is {value}")]
Expand All @@ -89,7 +96,7 @@
var logger = provider.CreateLogger("my_category");
Parallel.For(0, 100_000, i => Log(logger, 1));

provider.Logs.Should().HaveCount(100_000);
Assert.Equal(100_000, provider.Logs.Count);

Check failure on line 99 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

Argument 2: cannot convert from 'method group' to 'int'

Check failure on line 99 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

Argument 2: cannot convert from 'method group' to 'int'

Check failure on line 99 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

Argument 2: cannot convert from 'method group' to 'int'

Check failure on line 99 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

Argument 2: cannot convert from 'method group' to 'int'

Check failure on line 99 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Argument 2: cannot convert from 'method group' to 'int'

Check failure on line 99 in tests/Meziantou.Extensions.Logging.InMemory.Tests/InMemoryLoggerTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Argument 2: cannot convert from 'method group' to 'int'
}

#if NET8_0_OR_GREATER
Expand All @@ -101,12 +108,12 @@
Log(logger, 1);

var log = provider.Logs.Informations.Single();
log.CreatedAt.Should().Be(new(2000, 1, 1, 0, 0, 0, TimeSpan.Zero));
Assert.Equal(new DateTimeOffset(2000, 1, 1, 0, 0, 0, TimeSpan.Zero), log.CreatedAt);
}

private sealed class CustomTimeProvider : TimeProvider
{
public override DateTimeOffset GetUtcNow() => new(2000, 1, 1, 0, 0, 0, TimeSpan.Zero);
public override DateTimeOffset GetUtcNow() => new DateTimeOffset(2000, 1, 1, 0, 0, 0, TimeSpan.Zero);
}
#endif
}
24 changes: 9 additions & 15 deletions tests/Meziantou.Framework.ByteSize.Tests/ByteSizeTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Globalization;
using FluentAssertions;
using FluentAssertions.Execution;
using Xunit;

namespace Meziantou.Framework.Tests;
Expand All @@ -27,8 +25,8 @@ public void ToString_Test(long length, string format, string expectedValue)
var byteSize = new ByteSize(length);
var formattedValue = byteSize.ToString(format, CultureInfo.InvariantCulture);

formattedValue.Should().Be(expectedValue);
ByteSize.Parse(formattedValue, CultureInfo.InvariantCulture).Should().Be(ByteSize.Parse(expectedValue, CultureInfo.InvariantCulture));
Assert.Equal(expectedValue, formattedValue);
Assert.Equal(ByteSize.Parse(expectedValue, CultureInfo.InvariantCulture), ByteSize.Parse(formattedValue, CultureInfo.InvariantCulture));
}

[Theory]
Expand All @@ -42,7 +40,7 @@ public void ToString_Unit_Test(long length, ByteSizeUnit unit, string expectedVa
var byteSize = new ByteSize(length);
var formattedValue = byteSize.ToString(unit, CultureInfo.InvariantCulture);

formattedValue.Should().Be(expectedValue);
Assert.Equal(expectedValue, formattedValue);
}

[Theory]
Expand All @@ -58,30 +56,26 @@ public void Parse(string str, long expectedValue)
var actual = ByteSize.Parse(str, CultureInfo.InvariantCulture);
var parsed = ByteSize.TryParse(str, CultureInfo.InvariantCulture, out var actualTry);

using (new AssertionScope())
{
actual.Value.Should().Be(expectedValue);
actualTry.Value.Should().Be(expectedValue);
parsed.Should().BeTrue();
}
Assert.Equal(expectedValue, actual.Value);
Assert.Equal(expectedValue, actualTry.Value);
Assert.True(parsed);
}

[Theory]
[InlineData("1Bk")]
[InlineData("1AB")]
public void Parse_Invalid(string str)
{
Func<object> parse = () => ByteSize.Parse(str, CultureInfo.InvariantCulture);
parse.Should().ThrowExactly<FormatException>();
Assert.Throws<FormatException>(() => ByteSize.Parse(str, CultureInfo.InvariantCulture));

var parsed = ByteSize.TryParse(str, CultureInfo.InvariantCulture, out var actualTry);
parsed.Should().BeFalse();
Assert.False(parsed);
}

[Fact]
public void Operator_Add()
{
var result = ByteSize.FromKiloBytes(1) + ByteSize.FromKiloBytes(2);
result.Should().Be(3000L);
Assert.Equal(3000L, result);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using FluentAssertions;
using Xunit;

namespace Meziantou.Framework.CodeDom.Tests;
Expand All @@ -11,8 +10,8 @@ public void CodeAwaitExpression_ConfigureAwait()
var expression = new AwaitExpression(new SnippetExpression("test"));
var configuredExpression = expression.ConfigureAwait(continueOnCapturedContext: true);

configuredExpression.Should().Be(expression);
configuredExpression.Expression.As<MethodInvokeExpression>().Arguments[0].As<LiteralExpression>().Value.Should().Be(true);
Assert.Same(expression, configuredExpression);
Assert.True(configuredExpression.Expression is MethodInvokeExpression methodInvokeExpression && methodInvokeExpression.Arguments[0] is LiteralExpression literalExpression && literalExpression.Value.Equals(true));
}

[Fact]
Expand All @@ -21,7 +20,7 @@ public void CodeAwaitExpression_ConfigureAwait_NullExpression()
var expression = new AwaitExpression();
var configuredExpression = expression.ConfigureAwait(continueOnCapturedContext: true);

configuredExpression.Should().Be(expression);
configuredExpression.Expression.Should().BeNull();
Assert.Same(expression, configuredExpression);
Assert.Null(configuredExpression.Expression);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma warning disable MA0101 // String contains an implicit end of line character
using FluentAssertions;
using Xunit;

namespace Meziantou.Framework.CodeDom.Tests;
Expand All @@ -17,7 +16,7 @@
actual = actual.Replace("\r\n", "\n", StringComparison.Ordinal);
}

actual.Should().Be(expectedCsharpCode);
Assert.Equal(expectedCsharpCode, actual);
}

[Fact]
Expand Down Expand Up @@ -1620,14 +1619,14 @@
new ClassDeclaration("C")
{
Types = { innerStruct },
},

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Identifier expected

Check failure on line 1622 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Identifier expected
},
],

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Release, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Invalid expression term ','

Check failure on line 1623 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Invalid expression term ','
},
},
};

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1626 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected

var variable = new VariableDeclarationStatement("demo", new TypeReference(innerStruct));

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1628 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected
AssertCsharp(variable, @"global::A.B.C.D demo;
");

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

Syntax error, ',' expected

Check failure on line 1630 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release, /p:InvariantGlobalization=true)

Syntax error, ',' expected
}

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

; expected

Check failure on line 1631 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

; expected
}

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Release, /p:InvariantGlobalization=true)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (macos-14, Debug)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug, /p:InvariantGlobalization=true)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (ubuntu-22.04, Debug)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Release)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug)

} expected

Check failure on line 1632 in tests/Meziantou.Framework.CodeDom.Tests/CSharpCodeGeneratorTests.cs

View workflow job for this annotation

GitHub Actions / build_and_test_x64 (windows-2022, Debug, /p:InvariantGlobalization=true)

} expected
Loading