File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
tests/FSharpLint.Core.Tests/Rules/Conventions Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,29 @@ let MemberLength = 70
230230[<TestFixture>]
231231type TestMaxLinesInMember () =
232232 inherit TestAstNodeRuleBase.TestAstNodeRuleBase( MaxLinesInMember.rule { Config.MaxLines = MemberLength })
233- // TODO: Add tests.
233+ [<Test>]
234+ member this.MemberTooManyLines () =
235+ this.Parse $"""
236+ module Program
237+
238+ type Class() =
239+ member this.Member1 () =
240+ %s {generateNewLines MemberLength 8}
241+ ()
242+ \"\"\")
243+
244+ Assert.IsTrue(this.ErrorExistsAt(5, 4))
245+
246+ [<Test>]
247+ member this.MemberNotTooManyLines() =
248+ this.Parse \"\"\"
249+ module Program
250+
251+ type Class() =
252+ member this.Member1 () = ()
253+ \"\"""
254+
255+ Assert.IsFalse( this.ErrorExistsAt( 5 , 4 ))
234256
235257[<Literal>]
236258let PropertyLength = 70
You can’t perform that action at this time.
0 commit comments