public void ExecuteDrawingInstruction_PassNull() { var stroke = new SerializableStroke(_attributes, _points); var instruction = new EraseInstruction(stroke); Assert.Throws <ArgumentNullException>(() => instruction.ExecuteDrawingInstruction(null)); }
public void CtorSerializableStroke() { var stroke = new SerializableStroke(_attributes, _points); var instruction = new EraseInstruction(stroke); Assert.Equal(stroke, instruction.ErasingStroke); }
public void ExecuteDrawingInstruction() { var repositoryMock = new Mock <IDrawingInstructionRepository>(); var stroke = new SerializableStroke(_attributes, _points); var instruction = new EraseInstruction(stroke); instruction.ExecuteDrawingInstruction(repositoryMock.Object); repositoryMock.Verify(instructionRepository => instructionRepository.Erase(instruction), Times.Once); }
public void CtorStroke() { var instruction = new EraseInstruction(_nonSerializableStroke); Assert.True(instruction.ErasingStroke.Points.SequenceEqual(_points)); Assert.Equal(instruction.ErasingStroke.Attributes.Color, _attributes.Color); Assert.Equal(instruction.ErasingStroke.Attributes.Height, _attributes.Height); Assert.Equal(instruction.ErasingStroke.Attributes.Width, _attributes.Width); Assert.Equal(instruction.ErasingStroke.Attributes.IgnorePressure, _attributes.IgnorePressure); Assert.Equal(instruction.ErasingStroke.Attributes.IsHighlighter, _attributes.IsHighlighter); Assert.Equal(instruction.ErasingStroke.Attributes.StylusTip, _attributes.StylusTip); }