Example #1
0
        public void UpdateOrganisationAndCheckUpdatesHaveHappened()
        {
            var expectedOrgId  = _repository.CreateEpaOrganisation(_initialOrganisationDetails).Result;
            var initialResults = OrganisationHandler.GetOrganisationByOrgId(_organisationIdCreated);

            initialResults.Name               = _nameUpdated;
            initialResults.Ukprn              = _ukprnAfter;
            initialResults.UpdatedAt          = _updatedAt;
            initialResults.OrganisationTypeId = _organisationTypeIdAfter;
            initialResults.OrganisationData   = _updatedOrgData;
            var upatedOrgId    = _repository.UpdateEpaOrganisation(initialResults).Result;
            var updatedResults = OrganisationHandler.GetOrganisationByOrgId(_organisationIdCreated);

            updatedResults.CreatedAt = _createdAt;
            updatedResults.UpdatedAt = _updatedAt;
            _expectedOrganisationDetails.Should().BeEquivalentTo(updatedResults);
        }