main
1using developwithpassion.bdd.contexts;
2using Gorilla.Commons.Testing;
3using momoney.presentation.views;
4using MoMoney.Presentation.Winforms.Resources;
5using MoMoney.Service.Infrastructure.Eventing;
6
7namespace momoney.presentation.presenters
8{
9 [Concern(typeof (NotificationIconPresenter))]
10 public abstract class behaves_like_notification_icon_presenter : concerns_for<INotificationIconPresenter, NotificationIconPresenter>
11 {
12 //public override INotificationIconPresenter create_sut()
13 //{
14 // return new NotificationIconPresenter(view, broker);
15 //}
16
17 context c = () =>
18 {
19 view = the_dependency<INotificationIconView>();
20 broker = the_dependency<IEventAggregator>();
21 };
22
23 protected static INotificationIconView view;
24 protected static IEventAggregator broker;
25 }
26
27 public class when_initializing_the_notification_icon : behaves_like_notification_icon_presenter
28 {
29 it should_ask_the_view_to_display_the_correct_icon_and_text = () => view.was_told_to(v => v.display(ApplicationIcons.Application, "mokhan.ca"));
30
31 because b = () => sut.run();
32 }
33}