Exemplo n.º 1
0
 public void FilterTest4()
 {
     var str = @" ab /* Test ";
     var f = new CSharpFilter();
     Assert.AreEqual("ab", f.FilterElement(str));
     str = @" Test */ cd ";
     Assert.AreEqual(@"cd", f.FilterElement(str));
 }
Exemplo n.º 2
0
 public void FilterTest2()
 {
     var str = @" abc // Test A ";
     var f = new CSharpFilter();
     Assert.AreEqual(@"abc", f.FilterElement(str));
     str = @"/* Test */";
     Assert.AreEqual(null, f.FilterElement(str));
     str = @"a /* Test */ b /* Test */ c";
     Assert.AreEqual(@"a b c", f.FilterElement(str));
     str = @"a/* Test */b/* Test */c";
     Assert.AreEqual(@"a b c", f.FilterElement(str));
 }
Exemplo n.º 3
0
 public void FilterTest3()
 {
     var str = @"/* Test ";
     var f = new CSharpFilter();
     Assert.AreEqual(null, f.FilterElement(str));
     str = @"/* Test ";
     Assert.AreEqual(null, f.FilterElement(str));
     str = @" Test */";
     Assert.AreEqual(null, f.FilterElement(str));
     str = @" Test */";
     Assert.AreEqual(@"Test */", f.FilterElement(str));
 }
Exemplo n.º 4
0
 public void FilterTest1()
 {
     var str = @" abc ";
     var f = new CSharpFilter();
     Assert.AreEqual(@"abc", f.FilterElement(str));
     str = @"  ";
     f = new CSharpFilter();
     Assert.AreEqual(null, f.FilterElement(str));
     str = @" a   b c ";
     f = new CSharpFilter();
     Assert.AreEqual(@"a b c", f.FilterElement(str));
 }