Ejemplo n.º 1
0
        public string Generate(WordBlock block)
        {
            var result = new StringBuilder();

            result.Append("\n\t\t[SetUp]\n\t\tpublic void SetUp()\n\t\t{");

            result.Append(block.ProcessLines());
            // generate footer
            result.Append("\t\t}\n");
            return(result.ToString());
        }
Ejemplo n.º 2
0
        public string Generate(WordBlock block)
        {
            var result = new StringBuilder();

            // generate header
            result.Append("\n\t\t[Test]\n\t\tpublic void ");
            // get test name
            var testName = block.Lines[0].Words[1];

            result.Append(testName.Text);
            // continue header
            result.Append("()\n\t\t{\n\t\t\tusing (var mock = AutoMock.GetLoose())\n\t\t\t{\n");

            result.Append(block.ProcessLines("\t\t\t\t"));

            result.Append("\t\t\t}\n");
            // generate footer
            result.Append("\t\t}\n");
            return(result.ToString());
        }