public void DoubleQuoteConstructorTest() { var target = new DoubleQuote(); Check.That(target.PairedWith).IsNull(); Check.That(target.Text).IsEqualTo("\""); }
public void PairWithTest() { var target = new DoubleQuote(); var complement = new DoubleQuote(); target.PairWith(complement); Check.That(target.PairedWith).IsSameReferenceAs(complement); target.PairWith(target); Check.That(target.PairedWith).Not.IsSameReferenceAs(target); }
public override bool Test(string id) => !Bracket.Test(id) && !DoubleQuote.Test(id);
public void DoubleQuoteExceptionTest( ) { char result = DoubleQuote.Parse("'"); }
public void DoubleQuoteTest( ) { char result = DoubleQuote.Parse("\""); Assert.AreEqual('\"', result); }
/// <summary> /// Method to execute all DB tests /// </summary> /// <param name="type"></param> public void execute_tests(string type) { // Case for each type Keyword, Filter, DoubleQuote // set variables for all 3 types switch (type) { case "Keyword": Keyword kw = new Keyword(CF); Type _z = typeof(Keyword); _MethodInfo[] m = _z.GetMethods(); foreach(_MethodInfo y in m) { try { string x = y.ToString(); Console.Write("MethodName:" + x); Console.Write(Environment.NewLine); y.Invoke(kw, null); } catch { // Catch Non Executable Methods (Not Tests) } } break; case "DQ": DoubleQuote dq = new DoubleQuote(CF); Type _x = typeof(DoubleQuote); _MethodInfo[] a = _x.GetMethods(); foreach (_MethodInfo z in a) { try { z.Invoke(dq, null); } catch { // Catch Non Executable Methods (Not Tests) } } break; case "Filter": KWFilter kwf = new KWFilter(CF); Type _y = typeof(KWFilter); _MethodInfo[] b = _y.GetMethods(); foreach(_MethodInfo y in b) { try { y.Invoke(kwf, null); } catch { // Catch Non Executable Methods (Not Tests) } } break; } }