public object Create() { if (_generator == null) { _generator = new LongText(); _generator.Load(); } return(_generator.Create(Length)); }
public void Generate_Starts_With_Text() { LongText g = new LongText(); g.Load(); string text = ""; for (int i = 0; i < 100; i++) { var size = Sampling.GetUniform(140, 1000); text = g.Create(size, "super beggining of test"); Console.WriteLine(String.Format("{0} ({1})\n", text, text.Length)); Assert.True(text.Length <= size); } }