public void A_ChangedPartner_modifies_Existing_Partner_in_the_database() { var bootStrapper = new BootStrapper(); bootStrapper.StartServices(); var serviceEvents = bootStrapper.GetService<IServiceEvents>(); //1.- Create message var aggr = GenerateRandomAggregate(); //2.- Create the tuple in the database var repository = new PartnerRepository(_configuration.TestServer); repository.Insert(aggr); //3.- Change the aggregate aggr.SapCode = StringExtension.RandomString(10); aggr.PartnerChain.SapCode = StringExtension.RandomString(); //4.- Emit message var message = GenerateMessage(aggr); message.MessageType = typeof(ChangedPartner).Name; serviceEvents.AddIncommingEvent(new IncommingEvent { @event = message }); //5.- Load the saved country var service = repository.Get(aggr.Id); //6.- Check equality Assert.True(ObjectExtension.AreEqual(aggr, service)); }