Skip to content

Commit

Permalink
tests for isStatic
Browse files Browse the repository at this point in the history
Signed-off-by: Fritz Brandhuber <[email protected]>
  • Loading branch information
brandhuf committed Aug 23, 2021
1 parent 2f2040a commit 0c8140a
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,19 @@ public void DeclaredInTest()
Assert.True(allMembersAreNotDeclaredInEmptyTypeMultiple2.HasNoViolations(Architecture));
Assert.True(allMembersAreNotDeclaredInEmptyTypeMultiplePattern.HasNoViolations(Architecture));
}

[Fact]
public void IsStaticTest()
{
var correctIsStatic = Members().That().AreStatic().Should().BeStatic();
var correctIsStatic2 = Members().That().AreNotStatic().Should().NotBeStatic();
var wrongStatic = Members().That().AreStatic().Should().NotBeStatic();
var wrongStatic2 = Members().That().AreNotStatic().Should().BeStatic();

Assert.True(correctIsStatic.HasNoViolations(Architecture));
Assert.True(correctIsStatic2.HasNoViolations(Architecture));
Assert.False(wrongStatic.HasNoViolations(Architecture));
Assert.False(wrongStatic2.HasNoViolations(Architecture));
}
}
}

0 comments on commit 0c8140a

Please sign in to comment.