public void AppendCode_ValidCodeFragment_AppendsFragment() { var classBuilder = new CodeDomClassBuilder(); classBuilder.AppendCodeToString("1+1"); string result = classBuilder.Build(ClassName); Assert.That(result, Is.StringContaining("textWriter.Write(Convert.ToString(1+1));")); }