private static void TestTextProcessorList() { TextProcessorList processor = new TextProcessorList(); processor.ProcessorList.Add(new TextTrim()); processor.ProcessorList.Add(new TextBreakCamelCase()); processor.ProcessorList.Add(new TextFirstCharUpper()); UnitTest.Test(processor.Process(" aa\t bBaa DJ VA# Cc") as string == "Aa B Baa DJ VA# Cc"); }
public static IProcessorImmutable DefaultList(bool verbose) { TextProcessorList processor = new TextProcessorList(); processor.ProcessorList.Add(new TextTrim()); processor.ProcessorList.Add(new TextBreakUnderscores()); processor.ProcessorList.Add(new TextBreakCamelCase()); processor.ProcessorList.Add(new TextFirstCharUpper()); processor.Verbose = verbose; return(processor); }
private static void TestFrameProcessorText() { TextProcessorList textProcessor = new TextProcessorList(); textProcessor.ProcessorList.Add(new TextTrim()); textProcessor.ProcessorList.Add(new TextBreakCamelCase()); textProcessor.ProcessorList.Add(new TextFirstCharUpper()); IProcessorMutable frameProcessor = new FrameProcessorText(textProcessor); Frame frameBinary = new Frame(TagDescriptionMap.Instance[Version.v2_3], "EQUA"); frameProcessor.Process(frameBinary); Frame frameText = new Frame(TagDescriptionMap.Instance[Version.v2_3], "TALB"); frameText.Content.Text = "helloWorld 123'DJ B.I.G. VA"; frameProcessor.Process(frameText); UnitTest.Test(frameText.Content.Text == "Hello World 123'DJ B.I.G. VA"); }
public FrameProcessorText() { Processor = TextProcessorList.DefaultList(true); }