public void CheckBadReplace( ) { Obfuscar.Variables variables = new Obfuscar.Variables( ); variables.Add("Key1", "Value1"); TestUtils.AssertThrows(delegate { variables.Replace("$(Unreplaceable)"); }, typeof(ApplicationException), "Unable", "replace", "Unreplaceable"); }
public void CheckBadReplace( ) { Obfuscar.Variables variables = new Obfuscar.Variables( ); variables.Add( "Key1", "Value1" ); TestUtils.AssertThrows( delegate { variables.Replace( "$(Unreplaceable)" ); }, typeof( ApplicationException ), "Unable", "replace", "Unreplaceable" ); }
public void CheckReplace( ) { Obfuscar.Variables variables = new Obfuscar.Variables( ); variables.Add( "Key1", "Value1" ); string result = variables.Replace( "This: $(Key1) got replaced." ); Assert.AreEqual( "This: Value1 got replaced.", result ); }
public void CheckReplace( ) { Obfuscar.Variables variables = new Obfuscar.Variables( ); variables.Add("Key1", "Value1"); string result = variables.Replace("This: $(Key1) got replaced."); Assert.AreEqual("This: Value1 got replaced.", result); }