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 50961b7 commit 5a364dc
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using FluentAssertions.Common;
using Xunit;

namespace FluentAssertions.Specs.Types;
namespace FluentAssertions.Specs.Common;

public class TypeExtensionsSpecs
public partial class TypeExtensionsSpecs
{
[Fact]
public void When_comparing_types_and_types_are_same_it_should_return_true()
Expand Down
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 5a364dc

Please sign in to comment.