public void AsText_emptyBlock_includesBlockClose() { const string Sample = "TextSample"; var statement = new DotStatementBlock(Sample, new List <IDotStatement>()); Assert.That(statement.AsText(), Is.StringContaining("}")); }
public void Constructor_givenText_setsProperty() { const string Sample = "TextSample"; var statement = new DotStatementBlock(Sample, new List <IDotStatement>()); Assert.That(statement.Text, Is.EqualTo(Sample)); }
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())); }