예제 #1
0
        public void AssignedExpertsAreRemovedTest()
        {
            int     numberOfProjects = 5;
            int     numberOfExperts  = 2;
            int     numberOfFeatures = 3;
            Problem problem          = GenerateProblem(numberOfFeatures, numberOfProjects, numberOfExperts);

            double        methodCoefficient = 0;
            ProblemSolver solver            = new ProblemSolver(problem, methodCoefficient);

            solver.BuildConnections();
            solver.CreateStackOfFeaturesPopularity();
            solver.CreateStackOfProjectsDifficulty();

            int     expertsCountBefore = problem.listExperts.Count;
            Expert  expert             = problem.listExperts.First();
            Project proj = problem.listProjects.First();

            solver.Assign(expert, proj, 0);
            Assert.AreEqual(expertsCountBefore - 1, solver.Problem.listExperts.Count);
        }