/Source/Bifrost.Specs/Events/for_EventSubscriptionManager/when_getting_all_subscriptions_and_there_is_none_in_running_process.cs

# · C# · 16 lines · 13 code · 3 blank · 0 comment · 0 complexity · d5242be5e1ec960416692c0412868fae MD5 · raw file

  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using Bifrost.Events;
  4. using Machine.Specifications;
  5. namespace Bifrost.Specs.Events.for_EventSubscriptionManager
  6. {
  7. public class when_getting_all_subscriptions_and_there_is_none_in_running_process : given.an_event_subscription_manager_with_one_subscriber_from_repository
  8. {
  9. static IEnumerable<EventSubscription> subscriptions;
  10. Because of = () => subscriptions = event_subscription_manager.GetAllSubscriptions();
  11. It should_return_one_subscription = () => subscriptions.Count().ShouldEqual(1);
  12. }
  13. }