상속: ApiController
        public void Init()
        {
            System.Diagnostics.Debug.WriteLine("candidates init");

            context = GenerateNewContext();

            context.Tags.AddRange(DummyData.Tags);
            context.Currencies.AddRange(DummyData.Currencies);
            context.Skills.AddRange(DummyData.Skills);
            context.EventTypes.AddRange(DummyData.EventTypes);
            context.SocialNetworks.AddRange(DummyData.Socials);
            context.Tags.AddRange(DummyData.Tags);
            context.Industries.AddRange(DummyData.Industries);
            context.Levels.AddRange(DummyData.Levels);
            context.DepartmentGroups.AddRange(DummyData.DepartmentGroups);
            context.Departments.AddRange(DummyData.Departments);
            context.Languages.AddRange(DummyData.Languages);
            context.LanguageSkills.AddRange(DummyData.LanguageSkills);
            context.Countries.AddRange(DummyData.Countries);
            context.Cities.AddRange(DummyData.Cities);
            context.Stages.AddRange(DummyData.Stages);
            context.Permissions.AddRange(DummyData.Permissions);
            context.Roles.AddRange(DummyData.Roles);
            context.Users.Add(DummyData.Users.First());
            context.Sources.AddRange(DummyData.Sources);
            context.Vacancies.Add(DummyData.Vacancies.First());
            context.SaveChanges();

            var candidate = new Candidate
            {
                CityId = 1,
                BirthDate = new DateTime(1980, 1, 1),
                Comments = new List<Comment> { new Comment { Message = "someComment" } },
                Education = "education",
                FirstName = "first name",
                IndustryId = 1,
                Description = "description",
                Email = "*****@*****.**",
                Files = new List<File>(),
                IsMale = true,
                LanguageSkills = new List<LanguageSkill> { new LanguageSkill { LanguageId = 1, LanguageLevel = null } },
                LastName = "last name",
                MiddleName = "middlename",
                PhoneNumbers = new List<PhoneNumber>() { new PhoneNumber { Number = "+38098989898" } },
                Photo = new File { Description = "description", FilePath = "description" },
                PositionDesired = "position",
                Practice = "practice",
                RelocationAgreement = false,
                SalaryDesired = 3000,
                Skills = new List<Skill> { DummyData.Skills.First() },
                Skype = "skyper",
                SocialNetworks = new List<CandidateSocial>() { new CandidateSocial { SocialNetworkId = 1, Path = "path" } },
                Sources = new List<CandidateSource> { },
                StartExperience = new DateTime(2000, 1, 1),
                Tags = new List<Tag>() { DummyData.Tags.First() },
                TypeOfEmployment = TypeOfEmployment.FullTime,
                Level = DummyData.Levels.First(),
                VacanciesProgress = new List<VacancyStageInfo>(),
                Events = new List<Event> { new Event { EventDate = new DateTime(2001, 1, 1), CandidateId = 1, EventTypeId = 1, Description = "someDescr", ResponsibleId = 1 } }
            };

            int vacancyId = context.Vacancies.First().Id;
            candidate.VacanciesProgress.Add(new VacancyStageInfo
            {

            });
            candidate.Sources.Add(new CandidateSource { Candidate = candidate, Path = "path", SourceId = context.Sources.First().Id });

            context.Candidates.Add(candidate);

            context.SaveChanges();

            IUnitOfWork uow = new UnitOfWork(context);
            CandidateService service = new CandidateService(uow);

            controller = new CandidateController(service);
        }
 public void TearDown()
 {
     System.Diagnostics.Debug.WriteLine("candidates teardown");
     controller = null;
     context.Database.Delete();
     context = null;
 }
        public void Init()
        {
            System.Diagnostics.Debug.WriteLine("candidates init");

            context = GenerateNewContext();

            context.Sources.AddRange(DummyData.Sources);
            context.Countries.AddRange(DummyData.Countries);
            context.Languages.AddRange(DummyData.Languages);
            context.SocialNetworks.AddRange(DummyData.Socials);
            context.Tags.AddRange(DummyData.Tags);
            context.LanguageSkills.AddRange(DummyData.LanguageSkills);
            context.Cities.AddRange(DummyData.Cities);
            context.Industries.AddRange(DummyData.Industries);
            context.EventTypes.AddRange(DummyData.EventTypes);
            context.Users.AddRange(DummyData.Users);
            context.Candidates.AddRange(candidates);
            context.SaveChanges();

            IUnitOfWork uow = new UnitOfWork(context);
            CandidateService service = new CandidateService(uow);

            controller = new CandidateController(service);
        }