public Licensee CreateLicensee() { var name = TestDataGenerator.GetRandomString(5); var licensee = new Licensee { Id = Guid.NewGuid(), Name = name, CompanyName = name + " Inc.", Email = TestDataGenerator.GetRandomEmail(), ContractStart = DateTime.Now.Date, ContractEnd = DateTime.Now.Date.AddMonths(1), AllowedBrandCount = 10, Status = LicenseeStatus.Inactive }; _brandRepository.Licensees.Add(licensee); _bus.Publish(new LicenseeCreated(licensee)); return(licensee); }
public void CanDoItAll() { var fakeBus = new FakeBus(); fakeBus.Send(new MyMessage("send")).Wait(); fakeBus.SendLocal(new MyMessage("send")).Wait(); fakeBus.Publish(new MyMessage("send")).Wait(); fakeBus.Defer(TimeSpan.FromSeconds(10), new MyMessage("send")).Wait(); fakeBus.Subscribe<MyMessage>().Wait(); fakeBus.Unsubscribe<MyMessage>().Wait(); }
public void CanDoItAll() { var fakeBus = new FakeBus(); fakeBus.Send(new MyMessage("send")).Wait(); fakeBus.SendLocal(new MyMessage("send")).Wait(); fakeBus.Publish(new MyMessage("send")).Wait(); fakeBus.Defer(TimeSpan.FromSeconds(10), new MyMessage("send")).Wait(); fakeBus.Subscribe <MyMessage>().Wait(); fakeBus.Unsubscribe <MyMessage>().Wait(); }