public static void SetUp(TestContext context)
        {
            _memberFactory = new MemberFactory();
            _gomeeFactory = new GomeeFactory();
            _gomeeTargetFactory = new TargetFactory();

            using (var uow = new UnitOfWork())
            {
                _me = _memberFactory.CreateMember(Guid.NewGuid().ToString());
                _he = _memberFactory.CreateMember(Guid.NewGuid().ToString());

                uow.MemberRepository.Add(_me);
                uow.MemberRepository.Add(_he);

                _hisGomees = new List<Gomee>();
                _mineGomees = new List<Gomee>();
                _targets = new List<Target>();

                var count = new Random().Next(2, 5);
                for (var i = 0; i < count; i++)
                {
                    var mineGomee = _gomeeFactory.CreateGomee(_me);
                    var mineTarget = _gomeeTargetFactory.CreateGomeeTarget(_me, mineGomee);
                    var hisGome = _gomeeFactory.CreateGomee(_he);
                    var hisTarget1 = _gomeeTargetFactory.CreateGomeeTarget(_me, hisGome);
                    var hisTarget2 = _gomeeTargetFactory.CreateGomeeTarget(_me, hisGome);

                    _mineGomees.Add(mineGomee);
                    _hisGomees.Add(hisGome);
                    _targets.Add(mineTarget);
                    _targets.Add(hisTarget1);
                    _targets.Add(hisTarget2);

                    uow.GomeeRepository.Add(mineGomee);
                    uow.GomeeRepository.Add(hisGome);
                    uow.TargetRepository.Add(mineTarget);
                    uow.TargetRepository.Add(hisTarget1);
                    uow.TargetRepository.Add(hisTarget2);
                }

                uow.PersistAll();
            }

            using (var uow = new UnitOfWork())
            {
                var member = uow.MemberRepository.Get(_me.Id);
                _loadedGomees = uow.GomeeRepository.GetTheirsFor(member);
            }
        }
        public static void SetUp(TestContext context)
        {
            _unitOfWork = new UnitOfWork();
            _memberFactory = new MemberFactory();
            _gomeeFactory = new GomeeFactory();
            _targetFactory = new TargetFactory();
            _targetDecorator = new TargetDecorator(_targetFactory, _unitOfWork.TargetRepository);

            _member = _memberFactory.CreateMember(Guid.NewGuid().ToString());
            _gomee = _gomeeFactory.CreateGomee(_member);
            _targets = new List<Target>();

            using (var uow = new UnitOfWork())
            {
                uow.MemberRepository.Add(_member);
                uow.GomeeRepository.Add(_gomee);

                var count = new Random().Next(2, 5);
                for (var i = 0; i < count; i++)
                {
                    var target = _targetFactory.CreateGomeeTarget(_member, _gomee);
                    _targets.Add(target);
                    uow.TargetRepository.Add(target);
                }

                uow.PersistAll();
            }

            _loadedTargets = _targetDecorator.GetFor(_unitOfWork.GomeeRepository.Get(_gomee.Id));
        }
        public static void SetUp(TestContext context)
        {
            _unitOfWork = new UnitOfWork();
            _memberFactory = new MemberFactory();
            _gomeeFactory = new GomeeFactory();
            _targetFactory = new TargetFactory();
            _targetDecorator = new TargetDecorator(_targetFactory, _unitOfWork.TargetRepository);

            _member = _memberFactory.CreateMember(Guid.NewGuid().ToString());
            _gomee = _gomeeFactory.CreateGomee(_member);
            _target = _targetFactory.CreateGomeeTarget(_member, _gomee);

            using (var uow = new UnitOfWork())
            {
                uow.MemberRepository.Add(_member);
                uow.GomeeRepository.Add(_gomee);
                uow.TargetRepository.Add(_target);
                uow.PersistAll();
                _oldCount = uow.TargetRepository.Count();
            }

            _targetDecorator.Remove(_unitOfWork.TargetRepository.Get(_target.Id));
            _unitOfWork.PersistAll();

            _newCount = _unitOfWork.TargetRepository.Count();

            try
            {
                _loadedTarget = _unitOfWork.TargetRepository.Get(_target.Id);
            }
            catch (ArgumentException)
            {
                _loadedTarget = null;
            }
        }
        public static void SetUp(TestContext context)
        {
            _unitOfWork = new UnitOfWork();
            _memberFactory = new MemberFactory();
            _gomeeFactory = new GomeeFactory();
            _targetFactory = new TargetFactory();
            _targetDecorator = new TargetDecorator(_targetFactory, _unitOfWork.TargetRepository);

            _member = _memberFactory.CreateMember(Guid.NewGuid().ToString());
            _gomee = _gomeeFactory.CreateGomee(_member);
            _target = _targetFactory.CreateGomeeTarget(_member, _gomee);

            using (var uow = new UnitOfWork())
            {
                uow.MemberRepository.Add(_member);
                uow.GomeeRepository.Add(_gomee);
                uow.TargetRepository.Add(_target);
                uow.PersistAll();
            }

            _loadedTarget = _targetDecorator.Get(_target.Id);
        }