Esempio n. 1
0
        public void BetByIdTestMethod()
        {
            var solutionRepository = new SolutionRepository();

            var solution = solutionRepository.Get().FirstOrDefault();

            var newSolution = solutionRepository.Get(solution.EntityId);

            Assert.AreEqual(newSolution.EntityId, solution.EntityId);
        }
Esempio n. 2
0
        public void DeleteTestMethod()
        {
            var solutionRepository = new SolutionRepository();

            var solution = solutionRepository.Get(2);

            solutionRepository.Remove(solution);

            solution = solutionRepository.Get(2);

            Assert.IsNull(solution);
        }
Esempio n. 3
0
        public void UpdateTestMethod()
        {
            var solutionRepository = new SolutionRepository();

            var solution = solutionRepository.Get(2);

            solution.Alias     = "Core Solution";
            solution.UpdatedBy = "Test";
            solution.UpdatedOn = DateTime.Now;

            solution = solutionRepository.Update(solution);

            solution = solutionRepository.Get(2);

            Assert.AreEqual(solution.Alias, "Core Solution");
        }
Esempio n. 4
0
        public void BetAllTestMethod()
        {
            var solutionRepository = new SolutionRepository();

            var solutions = solutionRepository.Get();

            Assert.AreEqual(solutions.Count(), 1);
        }