Пример #1
0
    public void ExecuteDrawingInstruction_PassNull()
    {
        var stroke      = new SerializableStroke(_attributes, _points);
        var instruction = new DrawInstruction(stroke);

        Assert.Throws <ArgumentNullException>(() => instruction.ExecuteDrawingInstruction(null));
    }
Пример #2
0
    public void ExecuteDrawingInstruction()
    {
        var repositoryMock = new Mock <IDrawingInstructionRepository>();
        var stroke         = new SerializableStroke(_attributes, _points);
        var instruction    = new DrawInstruction(stroke);

        instruction.ExecuteDrawingInstruction(repositoryMock.Object);

        repositoryMock.Verify(instructionRepository => instructionRepository.Draw(instruction), Times.Once);
    }