public void apply_substitutions() { var substitutions = new Substitutions(); substitutions.Set("%KEY%", "the key"); substitutions.Set("%NAME%", "George Michael"); string text = "%KEY% is %NAME%"; substitutions.ApplySubstitutions(text) .ShouldEqual("the key is George Michael"); }
public string Contents(Substitutions substitutions) { return substitutions.ApplySubstitutions(RawText); }