Skip to content

Commit 6b333ff

Browse files
Use expression bodied getter for Model property in ComponentTestContext
1 parent bb56ec9 commit 6b333ff

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/MyTested.AspNetCore.Mvc.Abstractions/Internal/TestContexts/ComponentTestContext.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,7 @@ public IEnumerable<object> MethodAttributes
8080

8181
public object Model
8282
{
83-
get
84-
{
85-
if (this.model == null)
86-
{
87-
return this.MethodResult;
88-
}
89-
90-
return this.model;
91-
}
92-
83+
get => this.model ?? this.MethodResult;
9384
set => this.model = value;
9485
}
9586

0 commit comments

Comments
 (0)