public void DefaultBlocksTest() { var file = new DxfFile(); Assert.Equal(new[] { "*MODEL_SPACE", "*PAPER_SPACE" }, file.Blocks.Select(b => b.Name).ToArray()); file.Blocks.Clear(); file.Normalize(); Assert.Equal(new[] { "*MODEL_SPACE", "*PAPER_SPACE" }, file.Blocks.Select(b => b.Name).ToArray()); }
public void NullPlotSettingsName() { // artificially create a plot settings object without a plot view name var file = new DxfFile(); file.Clear(); var plotSettings = new DxfPlotSettings(); // ensure it doesn't end up as a view file.Objects.Add(plotSettings); Assert.Equal(0, file.Views.Count); file.Normalize(); Assert.Equal(0, file.Views.Count); // ensure that it ends up as a view when it has a valid name plotSettings.PlotViewName = "plot view name"; file.Normalize(); Assert.Equal(plotSettings.PlotViewName, file.Views.Single().Name); }