public void ShouldVerify_AcronymEnricher()
        {
            var resume = new Resume {Positions = new List<Position> {new Position {Description = "CSS, IIS"}}};
            var result = resume.Enrich();

            Assert.IsTrue(result.Positions[0].Description.ToLower().Contains("acronym title="));
        }
        public void ShouldVerifySaveAndLoadFromLocal()
        {
            var resume = new Resume
                             {
                                 Summary = string.Format("test-summary-{0}", Guid.NewGuid()),
                                 Educations = new List<Education> {new Education {Certificate = "test-certificate", Institute = string.Format("test-institute-{0}", Guid.NewGuid())}},
                                 Positions = new List<Position> {new Position
                                                                     {
                                                                         Company = "test-company",
                                                                         Description = string.Format("test-description-{0}", Guid.NewGuid()),
                                                                         Period = "test-period",
                                                                         Title = "test-title"
                                                                     }
                                                                },
                                 Specialties = "test-specialities"
                             };

            LocalDataExtensions.SaveLocal(resume);

            var resumeFromLoad = LocalDataExtensions.FindLocal(resume) as Resume;
            
            Assert.IsNotNull(resumeFromLoad);
            Assert.AreEqual(resume.Summary, resumeFromLoad.Summary);
            Assert.AreEqual(resume.Educations[0].Institute, resume.Educations[0].Institute);
            Assert.AreEqual(resume.Positions[0].Description, resumeFromLoad.Positions[0].Description);
        }
        public void ShouldVerifyStaleness()
        {
            var resume = new Resume();

            LocalDataExtensions.SaveLocal(resume);

            LocalDataExtensions.StalenessInDays = 1;
            Assert.IsFalse(resume.IsLocalStale());

            LocalDataExtensions.StalenessInDays = -1;
            Assert.IsTrue(resume.IsLocalStale());
        }
        public void ShouldVerifyRepository()
        {
            var resume = new Resume {Summary = Guid.NewGuid().ToString()};

            var repository = new Repository();

            Assert.IsTrue(repository.Save(resume));

            var result = repository.Find<Resume>();

            Assert.IsNotNull(result);
            Assert.AreEqual(resume.Summary, result.Summary);
        }