Example #1
0
        public void CheckBadReplace( )
        {
            Obfuscar.Variables variables = new Obfuscar.Variables( );
            variables.Add("Key1", "Value1");

            TestUtils.AssertThrows(delegate { variables.Replace("$(Unreplaceable)"); }, typeof(ApplicationException),
                                   "Unable", "replace", "Unreplaceable");
        }
Example #2
0
		public void CheckBadReplace( )
		{
			Obfuscar.Variables variables = new Obfuscar.Variables( );
			variables.Add( "Key1", "Value1" );

			TestUtils.AssertThrows( delegate { variables.Replace( "$(Unreplaceable)" ); }, typeof( ApplicationException ),
				"Unable", "replace", "Unreplaceable" );
		}
Example #3
0
		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 );
		}
Example #4
0
        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);
        }