GetOrReplace() public method

public GetOrReplace ( string key, Func func ) : string
key string
func Func
return string
 public void NoElement()
 {
     var input =
     @"<?xml version='1.0'?>
     <package >
       <metadata>
       </metadata>
     </package>".Replace("'", "\"");
     var runner = new Runner
     {
         NuspecContent = input
     };
     var output = runner.GetOrReplace("version", () => "1.2.3");
     Assert.AreEqual("1.2.3", output);
     Approvals.Verify(runner.NuspecContent);
 }