public MunicipalityFacilityLanguageWasAdded( MunicipalityId municipalityId, Language language) { MunicipalityId = municipalityId; Language = language; }
public MunicipalityNisCodeWasCorrected( MunicipalityId municipalityId, NisCode nisCode) { MunicipalityId = municipalityId; NisCode = nisCode; }
public static StreetName Register(StreetNameId streetNameId, MunicipalityId municipalityId, NisCode nisCode) { var streetName = Factory(); streetName.ApplyChange(new StreetNameWasRegistered(streetNameId, municipalityId, nisCode)); return(streetName); }
public MunicipalityWasRegistered( MunicipalityId municipalityId, NisCode nisCode) { MunicipalityId = municipalityId; NisCode = nisCode; }
public MunicipalityNisCodeWasDefined( MunicipalityId municipalityId, NisCode nisCode) { MunicipalityId = municipalityId; NisCode = nisCode; }
public static Municipality Register(MunicipalityId municipalityId, NisCode nisCode) { var municipality = Factory(); municipality.ApplyChange(new MunicipalityWasImported(municipalityId, nisCode)); return(municipality); }
public MunicipalityWasImported( MunicipalityId municipalityId, NisCode nisCode) { MunicipalityId = municipalityId; NisCode = nisCode; }
public SetMunicipalityToCurrent( MunicipalityId municipalityId, Provenance provenance) { MunicipalityId = municipalityId; Provenance = provenance; }
public RetireMunicipality( MunicipalityId municipalityId, Provenance provenance) { MunicipalityId = municipalityId; Provenance = provenance; }
public MunicipalityNameWasCleared( MunicipalityId municipalityId, Language language) { MunicipalityId = municipalityId; Language = language; }
public MunicipalityWasDrawn( MunicipalityId municipalityId, ExtendedWkbGeometry ewkb) { MunicipalityId = municipalityId; ExtendedWkbGeometry = ewkb.ToString(); }
public MunicipalityGeometryWasCorrected( MunicipalityId municipalityId, ExtendedWkbGeometry ewkb) { MunicipalityId = municipalityId; ExtendedWkbGeometry = ewkb.ToString(); }
public MunicipalityWasRetired( MunicipalityId municipalityId, RetirementDate retirementDate) { MunicipalityId = municipalityId; RetirementDate = retirementDate; }
public MunicipalityOfficialLanguageWasAdded( MunicipalityId municipalityId, Language language) { MunicipalityId = municipalityId; Language = language; }
public MunicipalityFacilitiesLanguageWasRemoved( MunicipalityId municipalityId, Language language) { MunicipalityId = municipalityId; Language = language; }
public WhenImportMunicipalityNameFromCrab(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { _fixture = new Fixture(); _fixture.Customize(new WithFixedMunicipalityId()); _fixture.Customize(new NodaTimeCustomization()); _municipalityId = _fixture.Create <MunicipalityId>(); }
public MunicipalityNameWasCorrected( MunicipalityId municipalityId, MunicipalityName municipalityName) { MunicipalityId = municipalityId; Language = municipalityName.Language; Name = municipalityName.Name; }
public MunicipalityWasNamed( MunicipalityId municipalityId, MunicipalityName municipalityName) { MunicipalityId = municipalityId; Language = municipalityName.Language; Name = municipalityName.Name; }
public ChangeMunicipalityNisCode( MunicipalityId municipalityId, NisCode nisCode, Provenance provenance) { MunicipalityId = municipalityId; NisCode = nisCode; Provenance = provenance; }
public static ImportMunicipality WithMunicipalityId( this ImportMunicipality command, MunicipalityId municipalityId) { return(new ImportMunicipality( municipalityId, new NisCode(command.NisCode), command.Provenance)); }
public StreetNameWasRegistered( StreetNameId streetNameId, MunicipalityId municipalityId, NisCode nisCode) { StreetNameId = streetNameId; MunicipalityId = municipalityId; NisCode = nisCode; }
public ImportMunicipality( MunicipalityId municipalityId, NisCode nisCode, Provenance provenance) { MunicipalityId = municipalityId; NisCode = nisCode; Provenance = provenance; }
public WhenImportingMunicipalityName(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { _fixture = new Fixture(); _fixture.Customize(new WithFixedMunicipalityId()); _fixture.Customize(new WithFixedProvenance()); _fixture.Customize(new NodaTimeCustomization()); _fixture.Customize(new WithProvenanceEventsUsePrivateConstructor()); _municipalityId = _fixture.Create <MunicipalityId>(); }
public WhenImportMunicipalityFromCrab(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { _fixture = new Fixture(); _fixture.Customize(new WithFixedMunicipalityId()); _fixture.Customize(new WithFixedNisCode()); _fixture.Customize(new NodaTimeCustomization()); _fixture.Customize(new WithProvenanceEventsUsePrivateConstructor()); _fixture.Customize(new WithWkbGeometry()); _municipalityId = _fixture.Create <MunicipalityId>(); }
public StreetNameWasProposedV2( MunicipalityId municipalityId, NisCode nisCode, Names streetNameNames, PersistentLocalId persistentLocalId) { MunicipalityId = municipalityId; NisCode = nisCode; StreetNameNames = streetNameNames; PersistentLocalId = persistentLocalId; }
public RegisterMunicipality( MunicipalityId municipalityId, NisCode nisCode, Language?primaryLanguage, Language?secondaryLanguage) { MunicipalityId = municipalityId; NisCode = nisCode; PrimaryLanguage = primaryLanguage; SecondaryLanguage = secondaryLanguage; }
public ProposeStreetName( MunicipalityId municipalityId, Names streetNameNames, PersistentLocalId persistentLocalId, Provenance provenance) { MunicipalityId = municipalityId; StreetNameNames = streetNameNames; Provenance = provenance; PersistentLocalId = persistentLocalId; }
public void Customize(IFixture fixture) { fixture.Freeze <CrabMunicipalityId>(); var deterministicId = fixture.Create <CrabMunicipalityId>().CreateDeterministicId(); var municipalityId = new MunicipalityId(deterministicId); fixture.Register(() => municipalityId); fixture.Customizations.Add( new FilteringSpecimenBuilder( new FixedBuilder(deterministicId), new ParameterSpecification( typeof(Guid), "municipalityId"))); }
public async Task Given_MunicipalityWasNamed_twice_and_municipality_was_registered_Then_expected_item_is_updated() { var projection = new MunicipalityListProjections(); var resolver = ConcurrentResolve.WhenEqualToHandlerMessageType(projection.Handlers); var crabMunicipalityId = new CrabMunicipalityId(1); var municipalityId = MunicipalityId.CreateFor(crabMunicipalityId); var nisCode = "456"; var municipalityWasRegistered = new MunicipalityWasRegistered(municipalityId, new NisCode(nisCode)); ((ISetProvenance)municipalityWasRegistered).SetProvenance(_provenance); var municipalityWasNamed = new MunicipalityWasNamed(municipalityId, new MunicipalityName("test", Language.Dutch)); ((ISetProvenance)municipalityWasNamed).SetProvenance(_provenance); var wasNamed = new MunicipalityWasNamed(municipalityId, new MunicipalityName("test21", Language.French)); ((ISetProvenance)wasNamed).SetProvenance(_provenance); await new ConnectedProjectionScenario <LegacyContext>(resolver) .Given( new Envelope <MunicipalityWasRegistered>(new Envelope( municipalityWasRegistered, EmptyMetadata)), new Envelope <MunicipalityWasNamed>(new Envelope( municipalityWasNamed, EmptyMetadata)), new Envelope <MunicipalityWasNamed>(new Envelope( wasNamed, EmptyMetadata))) .Verify(async context => { var municipality = await context.MunicipalityList.FirstAsync(a => a.MunicipalityId == municipalityId); municipality.MunicipalityId.Should().Be((Guid)municipalityId); municipality.NameDutch.Should().Be("test"); municipality.NameFrench.Should().Be("test21"); return(VerificationResult.Pass()); }) .Assert(); }
public async Task ImportStreetNameFromCrab( Func <IStreetNames> getStreetNames, CommandMessage <ImportStreetNameFromCrab> message, CancellationToken ct) { var streetNames = getStreetNames(); var streetNameId = StreetNameId.CreateFor(message.Command.StreetNameId); var municipalityId = MunicipalityId.CreateFor(message.Command.MunicipalityId); var streetName = await GetOrRegisterStreetName( streetNames, streetNameId, municipalityId, message.Command.NisCode, ct); ImportFromCrab(streetName.Value, message.Command); }