public void DeleteNonExistingPositionReturnsError()
        {
            var    position              = new DTOPosition(3, "1", "1");
            var    positionListStub      = new PositionListStub();
            var    positionListValidator = new PositionListValidator(positionListStub);
            string error = null;
            EventHandler <PositionListChangedEventArgs> handler = (sender, e) => error = e.Error;

            positionListValidator.PositionListChanged += handler;
            positionListValidator.LoadPositionList();
            positionListValidator.DeletePosition(position);
            Assert.AreEqual("Position 1 cannot be found", error);
        }
        public void DeletePositionMethod_InvokesDependencyDeletePositionMethod_IfPositionPassesValidation()
        {
            var  position         = new DTOPosition(1, "1", "1");
            var  positionListStub = new PositionListStub();
            bool invoked          = false;
            EventHandler <PositionListChangedEventArgs> handler = (sender, e) => invoked = true;

            positionListStub.PositionListChanged += handler;
            var positionListValidator = new PositionListValidator(positionListStub);

            positionListValidator.LoadPositionList();
            positionListValidator.DeletePosition(position);
            Assert.IsTrue(invoked);
        }