Skip to content

Commit

Permalink
SAVEPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisdoomen committed Oct 18, 2024
1 parent f715581 commit 16c29cf
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
#if NET6_0_OR_GREATER
using Xunit;

namespace FluentAssertions.Specs.Common;

public partial class TypeExtensionsSpecs
{
public class GetProperties
{
[Fact]
public void Test()
{
// Act
var properties = typeof(SuperClass).GetProperties();

// Assert
properties.Should().HaveCount(4);
}

private class SuperClass : BaseClass, IInterfaceWithDefaultProperty
{
public string NormalProperty { get; set; }

public new int NewProperty { get; set; }

public string BarProperty { get; set; }

public string FooProperty { get; set; }
}

private class BaseClass
{
public string NewProperty { get; set; }
}

private interface IInterfaceWithDefaultProperty : IInterfaceWithSingleProperty
{
string FooProperty { get; set; }

string DefaultProperty => "Default";
}

private interface IInterfaceWithSingleProperty
{
string BarProperty { get; set; }
}
}
}
#endif
1 change: 1 addition & 0 deletions Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn),IDE0052,1573,1591,1712,CS8002</NoWarn>
<DebugType>full</DebugType>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net47'">
Expand Down

0 comments on commit 16c29cf

Please sign in to comment.