public DrawInstruction(Stroke stroke)
 {
     if (stroke == null)
     {
         throw new ArgumentNullException(nameof(stroke));
     }
     DrawingStroke = SerializableStroke.FromStroke(stroke);
 }
    public void FromStroke()
    {
        var stroke = SerializableStroke.FromStroke(_nonSerializableStroke);

        Assert.True(stroke.Points.SequenceEqual(_nonSerializableStroke.StylusPoints.Select(sPoint => sPoint.ToPoint())));
        Assert.Equal(stroke.Attributes.Color.AsColor(), _nonSerializableStroke.DrawingAttributes.Color);
        Assert.Equal(stroke.Attributes.Height, _nonSerializableStroke.DrawingAttributes.Height);
        Assert.Equal(stroke.Attributes.Width, _nonSerializableStroke.DrawingAttributes.Width);
        Assert.Equal(stroke.Attributes.IgnorePressure, _nonSerializableStroke.DrawingAttributes.IgnorePressure);
        Assert.Equal(stroke.Attributes.IsHighlighter, _nonSerializableStroke.DrawingAttributes.IsHighlighter);
        Assert.Equal(stroke.Attributes.StylusTip, _nonSerializableStroke.DrawingAttributes.StylusTip);
    }
 public void FromStrokePassNull()
 {
     Assert.Throws <ArgumentNullException>(() => SerializableStroke.FromStroke(null));
 }