Пример #1
0
        private void CreateMembers(out Member start, out Member friend1, out Member friend2, out Member friend3, out Member second1, out Member second2, out Member common3)
        {
            start   = _membersCommand.CreateTestMember(0);
            friend1 = _membersCommand.CreateTestMember(1);
            friend2 = _membersCommand.CreateTestMember(2);
            friend3 = _membersCommand.CreateTestMember(3);

            second1         = _membersCommand.CreateTestMember(4);
            second1.PhotoId = _filesCommand.CreateTestFile(FileType.ProfilePhoto).Id;
            _membersCommand.UpdateMember(second1);

            second2         = _membersCommand.CreateTestMember(5);
            second2.PhotoId = _filesCommand.CreateTestFile(FileType.ProfilePhoto).Id;
            _membersCommand.UpdateMember(second2);

            common3         = _membersCommand.CreateTestMember(6);
            common3.PhotoId = _filesCommand.CreateTestFile(FileType.ProfilePhoto).Id;
            _membersCommand.UpdateMember(common3);

            _networkingCommand.CreateFirstDegreeLink(start.Id, friend1.Id);
            _networkingCommand.CreateFirstDegreeLink(start.Id, friend2.Id);
            _networkingCommand.CreateFirstDegreeLink(start.Id, friend3.Id);
            _networkingCommand.CreateFirstDegreeLink(friend1.Id, second1.Id);
            _networkingCommand.CreateFirstDegreeLink(friend2.Id, second1.Id);
            _networkingCommand.CreateFirstDegreeLink(friend2.Id, second2.Id);
            _networkingCommand.CreateFirstDegreeLink(friend3.Id, second1.Id);
            _networkingCommand.CreateFirstDegreeLink(friend3.Id, second2.Id);
            _networkingCommand.CreateFirstDegreeLink(friend3.Id, common3.Id);
        }
Пример #2
0
        public void TestCreateResumeFile()
        {
            var candidateId = Guid.NewGuid();

            _candidatesCommand.CreateCandidate(new Candidate {
                Id = candidateId
            });

            var file = _filesCommand.CreateTestFile(FileType.Resume);
            var resumeFileReference = new ResumeFileReference {
                FileReferenceId = file.Id
            };

            _candidateResumeFilesCommand.CreateResumeFile(candidateId, resumeFileReference);

            Assert.AreNotEqual(Guid.Empty, resumeFileReference.Id);
            Assert.AreNotEqual(DateTime.MinValue, resumeFileReference.UploadedTime);
            Assert.AreNotEqual(DateTime.MinValue, resumeFileReference.LastUsedTime);

            AssertResumeFile(resumeFileReference, _candidateResumeFilesQuery.GetResumeFile(candidateId, file.Id));
            var resumeFileReferences = _candidateResumeFilesQuery.GetResumeFiles(candidateId);

            Assert.AreEqual(1, resumeFileReferences.Count);
            AssertResumeFile(resumeFileReference, resumeFileReferences[0]);
            AssertResumeFile(resumeFileReference, _candidateResumeFilesQuery.GetLastUsedResumeFile(candidateId));
        }
Пример #3
0
 public static FileReference CreateTestFile(this IFilesCommand filesCommand, FileType fileType)
 {
     return(filesCommand.CreateTestFile(1, fileType));
 }