public async Task RemoveImage_should_create_events_and_update_state()
        {
            var command = new RemoveAppImage();

            await ExecuteCreateAsync();

            var result = await sut.ExecuteAsync(CreateCommand(command));

            result.ShouldBeEquivalent(sut.Snapshot);

            Assert.Null(sut.Snapshot.Image);

            LastEvents
            .ShouldHaveSameEvents(
                CreateEvent(new AppImageRemoved())
                );
        }
 private void RemoveImage(RemoveAppImage command)
 {
     Raise(command, new AppImageRemoved());
 }
Beispiel #3
0
 public void RemoveImage(RemoveAppImage command)
 {
     RaiseEvent(SimpleMapper.Map(command, new AppImageRemoved()));
 }
Beispiel #4
0
 public static void CanRemoveImage(RemoveAppImage command)
 {
     Guard.NotNull(command, nameof(command));
 }