Beispiel #1
0
        public void Organisation_is_created_and_start_date_is_correct()
        {
            const long organisationUkprn = 12344321;

            var command = new CreateOrganisationCommand
            {
                Ukprn = organisationUkprn,
                OrganisationTypeId   = _organisationTypeId1,
                ProviderTypeId       = _providerTypeId1,
                OrganisationStatusId = _organisationStatusId1,
                StatusDate           = DateTime.Today.AddDays(5),
                LegalName            = "Legal McLegal",
                Username             = "******",
                StartDate            = DateTime.Today
            };

            var orgPlaceholder = _repository.CreateOrganisation(command).Result;

            var organisationDetails = OrganisationHandler.GetOrganisationFromukprn(organisationUkprn);
            var organisationData    = new OrganisationDataHandler().Parse(organisationDetails.OrganisationData);

            Assert.AreEqual(DateTime.Today, organisationData.StartDate);
        }