public void ImplicitFormatOperator_Then_ResultShouldBeExpectedResult() { var testee = new NamedFormatString("{One}, {Two}, {0}", new[] { "One", "Two" }); string result = testee; result.Should().Be("{0}, {1}, {0}"); testee.FormatNames.Should().Equal(new[] { ("One", 0), ("Two", 1) });
public void FormatInvariant_Then_ResultShouldBeExpectedResult(string format, string[] names, object[] input, string expectedResult) { var testee = new NamedFormatString(format, names); var result = testee.FormatInvariant(input); result.Should().Be(expectedResult); }