public void PreventSetters_Test() { var p = new StringConversionParameter(); Assert.ThrowsException <InvalidOperationException>(() => p.Stream = new MemoryStream()); Assert.ThrowsException <InvalidOperationException>(() => p.AutoFlush = true); }
public void StringConversionParameter_Test() { var p = new StringConversionParameter(); Assert.IsInstanceOfType(p.Stream, typeof(MemoryStream)); Assert.IsFalse(p.AutoFlush); Assert.IsNotNull(p.AdditionalPlugins); }
//[Benchmark] public string RenderShortest() { var p = new StringConversionParameter { Elements = _shortestParagraph }; _conversionEngine.Convert(p); return(p.GetResult()); }
public void GetResult_Test() { var p = new StringConversionParameter(); var writter = new StreamWriter(p.Stream); writter.Write("test"); writter.Flush(); var r = p.GetResult(); Assert.AreEqual("test", r); }
public string RenderAll() { var p = new StringConversionParameter { Elements = _elements, Parallel = true }; _conversionEngine.Convert(p); return(p.GetResult()); }
public string RenderAllCamelCase() { var p = new StringConversionParameter { Elements = _elements, Parallel = true, }; p.AdditionalPlugins.Add(new CamelCasePlugin()); _conversionEngine.Convert(p); return(p.GetResult()); }