public void IsSatisfiedBy_NonExistsAchievement_False()
        {
            Stubs.Initialize();
            var target = new AchievementExistsSpecification();

            Assert.IsFalse(target.IsSatisfiedBy(new Achievement()));
        }
        public void IsSatisfiedBy_NonExistsDeveloper_False()
        {
            Stubs.Initialize();
            var target = new DeveloperExistsSpecification();

            Assert.IsFalse(target.IsSatisfiedBy(new Developer()));
        }
        public void IsSatisfiedBy_ThereIsNoAchievementWithSameName_True()
        {
            Stubs.Initialize();
            Stubs.AchievementRepository.Add(new Achievement()
            {
                Id = 1L, Name = "Name 1"
            });
            Stubs.UnitOfWork.Commit();
            var target = new AchievementUniqueNameSpecification();

            Assert.IsTrue(target.IsSatisfiedBy(new Achievement()
            {
                Id = 2L, Name = "Name"
            }));
        }
        public void IsSatisfiedBy_ExistsAchievement_True()
        {
            Stubs.Initialize();
            Stubs.AchievementRepository.Add(new Achievement()
            {
                Id = 1L
            });
            Stubs.UnitOfWork.Commit();

            var target = new AchievementExistsSpecification();

            Assert.IsTrue(target.IsSatisfiedBy(new Achievement()
            {
                Id = 1L
            }));
        }
        public void IsSatisfiedBy_ExistsDeveloper_True()
        {
            Stubs.Initialize();
            Stubs.DeveloperRepository.Add(new Developer()
            {
                Id = 1L
            });
            Stubs.UnitOfWork.Commit();

            var target = new DeveloperExistsSpecification();

            Assert.IsTrue(target.IsSatisfiedBy(new Developer()
            {
                Id = 1L
            }));
        }
        public void InitializeTest()
        {
            Stubs.Initialize();
            Stubs.AchievementRepository.Add(new Achievement()
            {
                Id = 1L
            });
            Stubs.AchievementRepository.Add(new Achievement()
            {
                Id = 2L
            });
            Stubs.AchievementRepository.Add(new Achievement()
            {
                Id = 3L
            });
            Stubs.AchievementRepository.Add(new Achievement()
            {
                Id = 4L
            });
            Stubs.UnitOfWork.Commit();

            m_target = new AchievementService();
        }
        public void InitializeTest()
        {
            Stubs.Initialize();
            Stubs.DeveloperRepository.Add(new Developer()
            {
                Id = 1L, Username = "******", Email = "*****@*****.**", FullName = "name"
            });
            Stubs.DeveloperRepository.Add(new Developer()
            {
                Id = 2L, Username = "******", Email = "*****@*****.**",
            });
            Stubs.DeveloperRepository.Add(new Developer()
            {
                Id = 3L, Username = "******", Email = "*****@*****.**",
            });
            Stubs.DeveloperRepository.Add(new Developer()
            {
                Id = 4L, Username = "******", Email = "*****@*****.**",
            });
            Stubs.UnitOfWork.Commit();

            m_target = new DeveloperService();
        }