Exemplo n.º 1
0
        public void AsText_emptyBlock_includesBlockClose()
        {
            const string Sample    = "TextSample";
            var          statement = new DotStatementBlock(Sample, new List <IDotStatement>());

            Assert.That(statement.AsText(), Is.StringContaining("}"));
        }
Exemplo n.º 2
0
        public void Constructor_givenText_setsProperty()
        {
            const string Sample    = "TextSample";
            var          statement = new DotStatementBlock(Sample, new List <IDotStatement>());

            Assert.That(statement.Text, Is.EqualTo(Sample));
        }
Exemplo n.º 3
0
        public void AsText_withStatement_includesStatementText()
        {
            var sampleStatement
                = new DotStatement("Sample")
                  .AddAttribute("Color", "Red");
            var innerStatements
                = new List <IDotStatement>
                {
                sampleStatement
                };
            var statement = new DotStatementBlock("Block", innerStatements);

            Assert.That(
                statement.AsText(),
                Is.StringContaining(sampleStatement.AsText()));
        }