// check print is used as the default expression /// <exception cref="System.IO.IOException"/> public virtual void ProcessOptionsNoExpression() { Org.Apache.Hadoop.FS.Shell.Find.Find find = new Org.Apache.Hadoop.FS.Shell.Find.Find (); find.SetConf(conf); string args = "path"; string expected = "Print(;)"; find.ProcessOptions(GetArgs(args)); Expression expression = find.GetRootExpression(); Assert.Equal(expected, expression.ToString()); }
// check -and is handled correctly /// <exception cref="System.IO.IOException"/> public virtual void ProcessOptionsAnd() { Org.Apache.Hadoop.FS.Shell.Find.Find find = new Org.Apache.Hadoop.FS.Shell.Find.Find (); find.SetConf(conf); string args = "path -name one -and -name two -and -print"; string expected = "And(;And(;Name(one;),Name(two;)),Print(;))"; find.ProcessOptions(GetArgs(args)); Expression expression = find.GetRootExpression(); Assert.Equal(expected, expression.ToString()); }