public void given_2_click_should_add_a_line_object_to_draw_pad()
        {
            var expect = new Line(new Point(1, 1), new Point(2, 2));

            _sut.OnMouseClick(_mockMouse.Object, new Point(1, 1));
            _sut.OnMouseClick(_mockMouse.Object, new Point(2, 2));

            _mockPad.Verify(o => o.Add(expect), Times.Once());
        }
Esempio n. 2
0
        public void given_draw_line_and_2_click_should_return_a_valid_line_object()
        {
            var expect = new Line(new Point(1, 1), new Point(1, 2));

            _sut.Process("line");
            _sut.OnMouseClick(new Point(1, 1));
            _sut.OnMouseClick(new Point(1, 2));

            _mockPad.Verify(o => o.Add(expect), Times.Once());
        }
Esempio n. 3
0
 protected bool Equals(Line other)
 {
     return _begin.Equals(other._begin) && _end.Equals(other._end);
 }