Exemplo n.º 1
0
        public void Clear_ShouldRemoveAllNotifications()
        {
            _sut = new Notifier();
            List <Notification> notifications = new() { new("any_key", "any_message"), new("any_key", "any_message") };

            _sut.AddNotifications(notifications);
            _sut.Clear();
            Assert.False(_sut.HasNotifications());
        }
Exemplo n.º 2
0
        public async Task <ClearNotificationsResponse> Handle(ClearNotificationsRequest request, CancellationToken cancellationToken)
        {
            await notifier.Clear();

            return(new ClearNotificationsResponse());
        }