public void TestReplacement3() { FormattableString formattableString = TestFormat3.FormattableWith(new { Replacement1 = Replacement1 }); Assert.Equal(TestFormat3Composite, formattableString.Format); Assert.Equal(1, formattableString.ArgumentCount); Assert.Equal(Replacement1, formattableString.GetArgument(0)); Assert.Equal(TestFormat3Solution, formattableString.ToString()); }
public void SpeedTest() { Dictionary <string, string> replacementDictionary = new Dictionary <string, string>() { ["Replacement1"] = Replacement1, ["Replacement2"] = Replacement2 }; for (int i = 0; i < 1000000; i++) { string replacement = TestFormat3.FormatWith(replacementDictionary); } }