Esempio n. 1
0
        public void TestAddCandidateAndThenWorkProfile()
        {
            TestCandidate candidate = new TestCandidate();

            candidate.Name = "Mohan";

            candidate = SaveAndReFetch(candidate);

            CandidateWorkProfile workProfile;

            Relation.AddNew(candidate, out workProfile);

            workProfile.CompanyName = "ResumePro";

            candidate = SaveAndReFetch(candidate);

            Assert.AreEqual(Relation.Count <CandidateWorkProfile>(candidate), 1);
        }
Esempio n. 2
0
        public void TestAddCandidateAndWorkProfileAndProject()
        {
            TestCandidate candidate = new TestCandidate();

            candidate.Name = "Mohan";

            CandidateWorkProfile workProfile;

            Relation.AddNew(candidate, out workProfile);
            workProfile.CompanyName = "HirePro";

            CandidateProject project = new CandidateProject();

            project.Name = "ResumePro";
            Relation.Add(workProfile, project);

            candidate = SaveAndReFetch(candidate);

            Assert.AreEqual(Relation.Count <CandidateWorkProfile>(candidate), 1);
            Assert.AreEqual(Relation.Count <CandidateProject>(workProfile), 1);
            Assert.AreEqual(
                CollectionHelper.First(Relation.Collection <CandidateProject>(workProfile)).Name,
                "ResumePro");
        }