Beispiel #1
0
        public async Task Find_publishes_pending_events()
        {
            var user = fixture.Create <FakeUser>();

            user.ChangeUsername("foo");

            await sut.Find(user.Id, CancellationToken.None);

            Mock.Get(eventPublisher).Verify(
                x =>
                x.PublishPendingEvents <FakeUser>(
                    user.Id,
                    CancellationToken.None),
                Times.Once());
        }
Beispiel #2
0
        public async Task Find_publishes_pending_events(
            FakeUser user,
            string username)
        {
            user.ChangeUsername(username);

            await sut.Find(user.Id, CancellationToken.None);

            Mock.Get(eventPublisher).Verify(
                x =>
                x.PublishPendingEvents <FakeUser>(
                    user.Id,
                    CancellationToken.None),
                Times.Once());
        }