public void Ungroup_Shape_Remove_And_Add_To_Source()
        {
            var shape  = new Class1();
            var point1 = new PointShape();
            var point2 = new PointShape();
            var point3 = new PointShape();

            var target = new GroupShape();

            target.AddShape(shape);
            target.AddConnectorAsNone(point1);
            target.AddConnectorAsInput(point2);
            target.AddConnectorAsOutput(point3);

            var source = new List <BaseShape> {
                target
            };

            target.Ungroup(source);

            Assert.Contains(shape, source);
            Assert.Contains(point1, source);
            Assert.Contains(point2, source);
            Assert.Contains(point3, source);

            var count = source.Count;

            Assert.Equal(4, count);

            Assert.False(point1.State.Flags.HasFlag(ShapeStateFlags.Connector | ShapeStateFlags.None));
            Assert.False(point2.State.Flags.HasFlag(ShapeStateFlags.Connector | ShapeStateFlags.Input));
            Assert.False(point3.State.Flags.HasFlag(ShapeStateFlags.Connector | ShapeStateFlags.Output));

            Assert.True(shape.State.Flags.HasFlag(ShapeStateFlags.Standalone));
            Assert.True(point1.State.Flags.HasFlag(ShapeStateFlags.Standalone));
            Assert.True(point2.State.Flags.HasFlag(ShapeStateFlags.Standalone));
            Assert.True(point3.State.Flags.HasFlag(ShapeStateFlags.Standalone));
        }