public void ShouldSaveVacancyOwnerRelationship() { // Arrange. var newVacancyOwnerRelationship = new VacancyOwnerRelationship { VacancyOwnerRelationshipId = 0, // zero indicates new Vacancy Party ProviderSiteId = SeedData.ProviderSites.HopwoodHallCollege.ProviderSiteId, EmployerId = SeedData.Employers.AwesomeInc.EmployerId, EmployerDescription = "Some employer description.", EmployerWebsiteUrl = "http://example.com" }; // Act. var savedVacancyOwnerRelationship = _vacancyOwnerRelationshipWriteRepository.Save(newVacancyOwnerRelationship); // Assert. savedVacancyOwnerRelationship.Should().NotBeNull(); savedVacancyOwnerRelationship.VacancyOwnerRelationshipId.Should().NotBe(0); // Arrange. var newEmployerDescription = new string(savedVacancyOwnerRelationship.EmployerDescription.Reverse().ToArray()); savedVacancyOwnerRelationship.EmployerDescription = newEmployerDescription; // Act. var updatedVacancyOwnerRelationship = _vacancyOwnerRelationshipWriteRepository.Save(savedVacancyOwnerRelationship); updatedVacancyOwnerRelationship.ShouldBeEquivalentTo(savedVacancyOwnerRelationship); }
public VacancyOwnerRelationship SaveVacancyOwnerRelationship(VacancyOwnerRelationship vacancyOwnerRelationship) { return(_vacancyOwnerRelationshipWriteRepository.Save(vacancyOwnerRelationship)); }