Skip to content

Commit 1d9464e

Browse files
Use string interpolation in ThrowNewAttributeAssertionException action
1 parent afee037 commit 1d9464e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/MyTested.AspNetCore.Mvc.Controllers/Builders/Attributes/ActionAttributesTestBuilder.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ public ActionAttributesTestBuilder(ControllerTestContext testContext)
3131
public IActionAttributesTestBuilder AndAlso() => this;
3232

3333
public override void ThrowNewAttributeAssertionException(string expectedValue, string actualValue)
34-
=> throw new AttributeAssertionException(string.Format(
35-
"{0} action to have {1}, but {2}.",
36-
this.TestContext.ExceptionMessagePrefix,
37-
expectedValue,
38-
actualValue));
34+
=> throw new AttributeAssertionException($"{this.TestContext.ExceptionMessagePrefix} action to have {expectedValue}, but {actualValue}.");
3935

4036
public IAndActionAttributesTestBuilder IncludingInherited()
4137
=> throw new System.NotImplementedException();

0 commit comments

Comments
 (0)