public void Setup()
        {
            _person  = new Person(_currentUserOid, "FirstName", "LastName", "UserName", "*****@*****.**");
            _project = new ProCoSysProject()
            {
                Id = 0, Description = "", IsClosed = false, Name = "ProjectName"
            };

            _currentUserProviderMock = new Mock <ICurrentUserProvider>();
            _currentUserProviderMock.Setup(x => x.GetCurrentUserOid())
            .Returns(_currentUserOid);

            _personRepositoryMock = new Mock <IPersonRepository>();
            _personRepositoryMock.Setup(x => x.GetWithSavedFiltersByOidAsync(_currentUserOid))
            .Returns(Task.FromResult(_person));

            _savedFilter = new SavedFilter(TestPlant, _project.Name, _oldTitle, _oldCriteria);
            _savedFilter.SetProtectedIdForTesting(2);
            _person.AddSavedFilter(_savedFilter);

            _command = new UpdateSavedFilterCommand(_savedFilter.Id, _newTitle, _newCriteria, _newDefaultFilter, _rowVersion);

            _dut = new UpdateSavedFilterCommandHandler(
                UnitOfWorkMock.Object,
                _currentUserProviderMock.Object,
                _personRepositoryMock.Object
                );
        }
        public void Setup()
        {
            _person  = new Person(_currentUserOid, "Current", "User");
            _project = new Project(TestPlant, "T", "D");

            _currentUserProviderMock = new Mock <ICurrentUserProvider>();
            _currentUserProviderMock.Setup(x => x.GetCurrentUserOid())
            .Returns(_currentUserOid);

            _personRepositoryMock = new Mock <IPersonRepository>();
            _personRepositoryMock.Setup(x => x.GetWithSavedFiltersByOidAsync(_currentUserOid))
            .Returns(Task.FromResult(_person));

            _savedFilter = new SavedFilter(TestPlant, _project, _oldTitle, _oldCriteria);
            _savedFilter.SetProtectedIdForTesting(2);
            _person.AddSavedFilter(_savedFilter);

            _command = new UpdateSavedFilterCommand(_savedFilter.Id, _newTitle, _newCriteria, _newDefaultFilter, _rowVersion);

            _dut = new UpdateSavedFilterCommandHandler(
                UnitOfWorkMock.Object,
                _currentUserProviderMock.Object,
                _personRepositoryMock.Object
                );
        }