public void ResumeStructureObject_RemoveSection_Works() { using (var ioc = new VitaeNinjectKernel()) { var rso = ioc.Get <IResumeStructureObject>(); rso.AddSection(ioc.Get <IFullNameSection>()); rso.AddSection(ioc.Get <IBasicInfoSection>()); rso.AddSection(ioc.Get <ITagLineSection>()); rso.AddSection(ioc.Get <IExpertiseSection>()); rso.AddSection(ioc.Get <IExperienceSection>()); rso.AddSection(ioc.Get <IEducationSection>()); rso.AddSection(ioc.Get <IPublicationsSection>()); rso.RemoveSection(0); Assert.IsInstanceOfType(rso.ResumeSections[0], typeof(IBasicInfoSection)); Assert.IsInstanceOfType(rso.ResumeSections[1], typeof(ITagLineSection)); Assert.IsInstanceOfType(rso.ResumeSections[2], typeof(IExpertiseSection)); Assert.IsInstanceOfType(rso.ResumeSections[3], typeof(IExperienceSection)); Assert.IsInstanceOfType(rso.ResumeSections[4], typeof(IEducationSection)); Assert.IsInstanceOfType(rso.ResumeSections[5], typeof(IPublicationsSection)); Assert.AreEqual(6, rso.ResumeSections.Count); rso.RemoveSection(3); Assert.IsInstanceOfType(rso.ResumeSections[0], typeof(IBasicInfoSection)); Assert.IsInstanceOfType(rso.ResumeSections[1], typeof(ITagLineSection)); Assert.IsInstanceOfType(rso.ResumeSections[2], typeof(IExpertiseSection)); Assert.IsInstanceOfType(rso.ResumeSections[3], typeof(IEducationSection)); Assert.IsInstanceOfType(rso.ResumeSections[4], typeof(IPublicationsSection)); Assert.AreEqual(5, rso.ResumeSections.Count); } }
public void ResumeFormatObject_DefaultValuesAreCorrect() { using (var ioc = new VitaeNinjectKernel()) { var rfo = ioc.Get <IResumeFormatObject>(); Assert.AreEqual((WdColor)14911564, rfo.NameColorWord); Assert.AreEqual("Segoe UI Light", rfo.NameFontName); Assert.AreEqual(24, rfo.NameFontSize); Assert.AreEqual(WdColor.wdColorBlack, rfo.TagLineColorWord); Assert.AreEqual("Segoe UI Light", rfo.TagLineFontName); Assert.AreEqual(16, rfo.TagLineFontSize); Assert.AreEqual((WdColor)14911564, rfo.HeaderColorWord); Assert.AreEqual("Segoe UI Light", rfo.HeaderFontName); Assert.AreEqual(16, rfo.HeaderFontSize); Assert.AreEqual(WdColor.wdColorBlack, rfo.JobInfoColorWord); Assert.AreEqual("Segoe UI Semibold", rfo.JobInfoFontName); Assert.AreEqual(12, rfo.JobInfoFontSize); Assert.AreEqual(WdColor.wdColorBlack, rfo.CategoryColorWord); Assert.AreEqual("Segoe UI Semibold", rfo.CategoryFontName); Assert.AreEqual(11, rfo.CategoryFontSize); Assert.AreEqual("Segoe UI", rfo.BodyFontName); Assert.AreEqual(11, rfo.BodyFontSize); } }
public void ResumeCreatorViewModel_MovePublicationDownCommand_Works() { using (var ioc = new VitaeNinjectKernel()) { var vm = ioc.Get <IResumeCreatorViewModel>(); var item1 = vm.SelectedOutPublication = vm.OutPublications.FirstOrDefault(); vm.AddPublicationCommand.Execute(null); var item2 = vm.SelectedOutPublication = vm.OutPublications.FirstOrDefault(); vm.AddPublicationCommand.Execute(null); var item3 = vm.SelectedOutPublication = vm.OutPublications.FirstOrDefault(); vm.AddPublicationCommand.Execute(null); vm.SelectedInPublication = null; Assert.IsFalse(vm.MovePublicationDownCommand.CanExecute(null)); vm.SelectedInPublication = item1; Assert.IsTrue(vm.MovePublicationDownCommand.CanExecute(null)); vm.SelectedInPublication = item2; Assert.IsTrue(vm.MovePublicationDownCommand.CanExecute(null)); vm.SelectedInPublication = item3; Assert.IsFalse(vm.MovePublicationDownCommand.CanExecute(null)); vm.SelectedInPublication = item2; vm.MovePublicationDownCommand.Execute(null); Assert.AreEqual(0, vm.InPublications.IndexOf(item1)); Assert.AreEqual(1, vm.InPublications.IndexOf(item3)); Assert.AreEqual(2, vm.InPublications.IndexOf(item2)); } }
public void ResumeCreatorViewModel_RemoveExpertiseCommand_Works() { using (var ioc = new VitaeNinjectKernel()) { var vm = ioc.Get <IResumeCreatorViewModel>(); var expertiseItem1 = vm.OutExpertises.FirstOrDefault(); vm.SelectedOutExpertise = expertiseItem1; vm.AddExpertiseCommand.Execute(null); var expertiseItem2 = vm.OutExpertises.FirstOrDefault(); vm.SelectedOutExpertise = expertiseItem2; vm.AddExpertiseCommand.Execute(null); Assert.IsFalse(vm.RemoveExpertiseCommand.CanExecute(null)); vm.SelectedInExpertise = vm.InExpertises.FirstOrDefault(); Assert.IsTrue(vm.RemoveExpertiseCommand.CanExecute(null)); vm.RemoveExpertiseCommand.Execute(null); Assert.IsTrue(vm.OutExpertises.Contains(expertiseItem1)); Assert.IsFalse(vm.InExpertises.Contains(expertiseItem1)); Assert.IsNull(vm.SelectedOutExpertise); Assert.IsNull(vm.SelectedInExpertise); Assert.AreEqual(0, vm.InExpertises.IndexOf(expertiseItem2)); } }
public void ResumeStructureObject_Constructor_Works() { using (var ioc = new VitaeNinjectKernel()) { var rso = ioc.Get <IResumeStructureObject>(); Assert.IsNotNull(rso.ResumeSections); Assert.AreEqual(0, rso.ResumeSections.Count); } }
//[TestMethod] public void CreateGuidForEachExperience_DONE() { using (var ioc = new VitaeNinjectKernel()) { var serv = ioc.Get <IExperienceRepository>(); foreach (var item in serv.GetAll()) { serv.Add(item); } } }
//[TestMethod] public void CreateGuidForGeneralInfo_DONE() { using (var ioc = new VitaeNinjectKernel()) { var serv = ioc.Get <IGeneralInfoRepository>(); foreach (var item in serv.GetAll()) { serv.Add(item); } } }
public void KeywordService_GetKeywords_Works() { using (var ioc = new VitaeNinjectKernel()) { var ks = ioc.Get <IKeywordService>(); string bigText = "A be Cat DATE exist Father GUESSER hotelier Ionizerss "; var minOneList = ks.GetKeywords(bigText, 1) as List <string>; Assert.AreEqual(9, minOneList.Count); var minFiveList = ks.GetKeywords(bigText, 5) as List <string>; Assert.AreEqual(5, minFiveList.Count); var minTenList = ks.GetKeywords(bigText, 10) as List <string>; Assert.AreEqual(0, minTenList.Count); } }
public void ResumeDataObject_Constructor_Works() { using (var ioc = new VitaeNinjectKernel()) { IResumeDataObject rdo = ioc.Get <IResumeDataObject>(); Assert.AreEqual(string.Empty, rdo.FullName); Assert.AreEqual(string.Empty, rdo.AddressLine1); Assert.AreEqual(string.Empty, rdo.AddressLine2); Assert.AreEqual(string.Empty, rdo.Email); Assert.AreEqual(string.Empty, rdo.PhoneNumber); Assert.AreEqual(string.Empty, rdo.TagLine); Assert.IsNotNull(rdo.EducationEntities); Assert.IsNotNull(rdo.ExperienceEntities); Assert.IsNotNull(rdo.ExpertiseEntities); Assert.IsNotNull(rdo.PublicationEntities); } }
public void ResumeCreatorViewModel_RemoveEducationCommand_Works() { using (var ioc = new VitaeNinjectKernel()) { var vm = ioc.Get <IResumeCreatorViewModel>(); var item1 = vm.SelectedOutEducation = vm.OutEducations.FirstOrDefault(); vm.AddEducationCommand.Execute(null); var item2 = vm.SelectedOutEducation = vm.OutEducations.FirstOrDefault(); vm.AddEducationCommand.Execute(null); vm.SelectedOutEducation = null; Assert.IsFalse(vm.RemoveEducationCommand.CanExecute(null)); vm.SelectedInEducation = item1; vm.RemoveEducationCommand.Execute(null); Assert.IsFalse(vm.InEducations.Contains(item1)); Assert.IsTrue(vm.InEducations.Contains(item2)); Assert.AreEqual(1, vm.InEducations.Count); } }
public void ResumeCreatorViewModel_AddPublicationCommand_Works() { using (var ioc = new VitaeNinjectKernel()) { var vm = ioc.Get <IResumeCreatorViewModel>(); vm.SelectedOutPublication = null; Assert.IsFalse(vm.AddPublicationCommand.CanExecute(null)); vm.SelectedOutPublication = vm.OutPublications.FirstOrDefault(); Assert.IsTrue(vm.AddPublicationCommand.CanExecute(null)); vm.SelectedOutPublication = vm.OutPublications.FirstOrDefault(); vm.AddPublicationCommand.Execute(null); Assert.IsTrue(vm.InPublications.Contains(vm.SelectedOutPublication)); Assert.IsFalse(vm.OutPublications.Contains(vm.SelectedOutPublication)); vm.SelectedOutPublication = vm.OutPublications.FirstOrDefault(); vm.AddPublicationCommand.Execute(null); Assert.AreEqual(2, vm.InPublications.Count); Assert.AreEqual(1, vm.InPublications.IndexOf(vm.SelectedOutPublication)); } }
public void ResumeStructureObject_Move_Works() { using (var ioc = new VitaeNinjectKernel()) { ResumeStructureObject rso = new ResumeStructureObject(); rso.AddSection(ioc.Get <IFullNameSection>()); rso.AddSection(ioc.Get <IBasicInfoSection>()); rso.AddSection(ioc.Get <ITagLineSection>()); rso.AddSection(ioc.Get <IExpertiseSection>()); rso.AddSection(ioc.Get <IExperienceSection>()); rso.AddSection(ioc.Get <IEducationSection>()); rso.AddSection(ioc.Get <IPublicationsSection>()); rso.MoveSection(2, 1); Assert.IsInstanceOfType(rso.ResumeSections[0], typeof(IFullNameSection)); Assert.IsInstanceOfType(rso.ResumeSections[2], typeof(IBasicInfoSection)); Assert.IsInstanceOfType(rso.ResumeSections[1], typeof(ITagLineSection)); Assert.IsInstanceOfType(rso.ResumeSections[3], typeof(IExpertiseSection)); Assert.IsInstanceOfType(rso.ResumeSections[4], typeof(IExperienceSection)); Assert.IsInstanceOfType(rso.ResumeSections[5], typeof(IEducationSection)); Assert.IsInstanceOfType(rso.ResumeSections[6], typeof(IPublicationsSection)); } }