private void InsertClassDiagram(SDType sdType)
 {
     if (!sdType.IsClassDiagramEmpty())
     {
         var tmpImagePath = Path.Combine(_outputPath, "tmp", sdType.Guid + ".png");
         sdType.GetClassDiagram().ToPng(tmpImagePath);
         _wordTemplater.AppendImage(tmpImagePath, "Diagram");
     }
 }
        public void ShouldReturnTrueForClassDiagramIsEmpty()
        {
            //Arrange
            var sdType = new SDType("SharpDox.UML.Tests.DiagramExtensionsTests", "DiagramExtensionTests", new SDNamespace("SharpDox.UML.Tests"));

            //Act
            var isEmpty = sdType.IsClassDiagramEmpty();

            //Assert
            Assert.AreEqual(true, isEmpty);
        }
        public void ShouldReturnFalseForClassDiagramIsEmptyBecauseFieldPresent()
        {
            //Arrange
            var sdType = new SDType("SharpDox.UML.Tests.DiagramExtensionsTests", "DiagramExtensionTests", new SDNamespace("SharpDox.UML.Tests"));

            sdType.Fields.Add(new SDField("SharpDox.UML.Tests.DiagramExtensionsTests.Field1"));

            //Act
            var isEmpty = sdType.IsClassDiagramEmpty();

            //Assert
            Assert.AreEqual(false, isEmpty);
        }