Akka.Persistence.Tests.SnapshotFailureRobustnessSpec.PersistentActor_with_a_failing_snapshot_should_receive_failure_message_when_deleting_a_single_snapshot_fails C# (CSharp) Method

PersistentActor_with_a_failing_snapshot_should_receive_failure_message_when_deleting_a_single_snapshot_fails() private method

        public void PersistentActor_with_a_failing_snapshot_should_receive_failure_message_when_deleting_a_single_snapshot_fails()
        {
            var pref = Sys.ActorOf(Props.Create(() => new DeleteSnapshotTestActor(Name, TestActor)));
            var persistenceId = Name;

            ExpectMsg<RecoveryCompleted>();
            pref.Tell(new Cmd("hello"));
            ExpectMsg(1L);
            pref.Tell(new DeleteSnapshot(1));
            ExpectMsg<DeleteSnapshotFailure>(m => m.Metadata.PersistenceId.Equals(persistenceId) &&
                                          m.Metadata.SequenceNr == 1 &&
                                          m.Cause.Message.Contains("Failed to delete"));
        }