Commit 23ceb50
Changed files (45)
product
Boot
boot
container
registration
proxy_configuration
database
transactions
Presentation
Model
Presenters
Service
Infrastructure
Eventing
product/Boot/boot/container/registration/proxy_configuration/NotifyProgressInterceptor.cs
@@ -1,5 +1,5 @@
using Castle.Core.Interceptor;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.boot.container.registration.proxy_configuration
product/Boot/boot/global_error_handling.cs
@@ -3,7 +3,7 @@ using System.Windows.Forms;
using Gorilla.Commons.Infrastructure.Container;
using Gorilla.Commons.Infrastructure.Logging;
using gorilla.commons.utility;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.boot
product/Boot/boot/WindowsFormsApplication.cs
@@ -11,7 +11,7 @@ using Gorilla.Commons.Infrastructure.Logging;
using gorilla.commons.utility;
using momoney.boot;
using MoMoney.boot.container;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Presenters;
using MoMoney.Service.Infrastructure.Eventing;
using momoney.service.infrastructure.threading;
product/Boot/Modules/ApplicationMenuModule.cs
@@ -1,4 +1,4 @@
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Menu;
using momoney.presentation.presenters;
using MoMoney.Presentation.Presenters;
product/Boot/Modules/GettingStartedModule.cs
@@ -1,5 +1,5 @@
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using momoney.presentation.presenters;
using MoMoney.Presentation.Presenters;
using MoMoney.Service.Infrastructure.Eventing;
product/Boot/Modules/IApplicationMenuModule.cs
@@ -1,5 +1,5 @@
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.Modules
product/Boot/Modules/IMainMenuModule.cs
@@ -1,5 +1,5 @@
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.Modules
product/Boot/Modules/IToolbarModule.cs
@@ -1,5 +1,5 @@
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.Modules
product/Boot/Modules/MainMenuModule.cs
@@ -1,4 +1,4 @@
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Presenters;
using MoMoney.Service.Infrastructure.Eventing;
product/Boot/Modules/ToolbarModule.cs
@@ -1,4 +1,4 @@
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Menu;
using momoney.presentation.presenters;
using MoMoney.Presentation.Presenters;
product/database/transactions/TransactionSpecs.cs
@@ -36,7 +36,7 @@ namespace momoney.database.transactions
public class when_committing_a_transaction_and_an_item_in_the_identity_map_has_changed : behaves_like_transaction
{
it should_commit_the_changes_to_that_item =
- () => tracker.was_told_to<IChangeTracker<IMovie>>(x => x.commit_to(database));
+ () => tracker.was_told_to(x => x.commit_to(database));
context c = () =>
{
product/Presentation/Model/eventing/ClosingProjectEvent.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class ClosingProjectEvent : IEvent
{
product/Presentation/Model/eventing/ClosingTheApplication.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class ClosingTheApplication : IEvent
{
product/Presentation/Model/eventing/FinishedRunningCommand.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class FinishedRunningCommand : IEvent
{
product/Presentation/Model/eventing/NewProjectOpened.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class NewProjectOpened : IEvent
{
product/Presentation/Model/eventing/SavedChangesEvent.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class SavedChangesEvent : IEvent
{
product/Presentation/Model/eventing/StartedRunningCommand.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class StartedRunningCommand : IEvent
{
product/Presentation/Model/eventing/UnhandledErrorOccurred.cs
@@ -1,7 +1,7 @@
using System;
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class UnhandledErrorOccurred : IEvent
{
product/Presentation/Model/eventing/UnsavedChangesEvent.cs
@@ -1,6 +1,6 @@
using MoMoney.Service.Infrastructure.Eventing;
-namespace momoney.presentation.model.events
+namespace momoney.presentation.model.eventing
{
public class UnsavedChangesEvent : IEvent
{
product/Presentation/Model/Menu/File/ExitCommand.cs
@@ -1,6 +1,6 @@
using gorilla.commons.utility;
using MoMoney.Presentation.Core;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Menu.File;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Model/Menu/File/ExitCommandSpecs.cs
@@ -1,7 +1,7 @@
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
using MoMoney.Presentation.Core;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Menu.File;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Model/Projects/ProjectController.cs
@@ -1,7 +1,7 @@
using Gorilla.Commons.Infrastructure.FileSystem;
using Gorilla.Commons.Infrastructure.Logging;
using gorilla.commons.utility;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Contracts.Infrastructure;
using momoney.service.contracts.infrastructure.transactions;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Model/Projects/ProjectControllerSpecs.cs
@@ -3,7 +3,7 @@ using developwithpassion.bdd.contexts;
using Gorilla.Commons.Infrastructure.FileSystem;
using Gorilla.Commons.Testing;
using gorilla.commons.utility;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Contracts.Infrastructure;
using momoney.service.contracts.infrastructure.transactions;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/ApplicationShellPresenter.cs
@@ -1,5 +1,5 @@
using MoMoney.Presentation.Core;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using momoney.presentation.model.menu.file;
using MoMoney.Presentation.Views;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/NotificationIconPresenter.cs
@@ -1,6 +1,6 @@
using System.Net.NetworkInformation;
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using momoney.presentation.views;
using MoMoney.Presentation.Winforms.Resources;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/RestartCommand.cs
@@ -1,6 +1,6 @@
using gorilla.commons.utility;
using MoMoney.Presentation.Core;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Service.Infrastructure.Eventing;
namespace momoney.presentation.presenters
product/Presentation/Presenters/StatusBarPresenter.cs
@@ -1,7 +1,7 @@
using System;
using gorilla.commons.utility;
using Gorilla.Commons.Utility;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Resources;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/StatusBarPresenterSpecs.cs
@@ -1,9 +1,8 @@
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Resources;
-using MoMoney.Service.Infrastructure.Eventing;
namespace MoMoney.Presentation.Presenters
{
@@ -14,14 +13,12 @@ namespace MoMoney.Presentation.Presenters
() => view.was_told_to(v => v.display(ApplicationIcons.green_circle, "Ready"));
context c = () =>
- {
- view = the_dependency<IStatusBarView>();
- broker = the_dependency<IEventAggregator>();
- };
+ {
+ view = the_dependency<IStatusBarView>();
+ };
because b = () => sut.notify(new NewProjectOpened(""));
static IStatusBarView view;
- static IEventAggregator broker;
}
}
\ No newline at end of file
product/Presentation/Presenters/TaskTrayPresenter.cs
@@ -1,6 +1,6 @@
using gorilla.commons.utility;
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using momoney.presentation.views;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/TitleBarPresenter.cs
@@ -1,6 +1,6 @@
using Gorilla.Commons.Infrastructure.Logging;
using MoMoney.Presentation;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Projects;
using MoMoney.Presentation.Views;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/TitleBarPresenterSpecs.cs
@@ -1,6 +1,6 @@
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using MoMoney.Presentation.Model.Projects;
using MoMoney.Presentation.Views;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/UnhandledErrorPresenter.cs
@@ -1,6 +1,6 @@
using MoMoney.Presentation;
using MoMoney.Presentation.Core;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using momoney.presentation.views;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Presenters/UnhandledErrorPresenterSpecs.cs
@@ -1,7 +1,7 @@
using System;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-using momoney.presentation.model.events;
+using momoney.presentation.model.eventing;
using momoney.presentation.views;
using MoMoney.Service.Infrastructure.Eventing;
product/Presentation/Winforms/Helpers/BindableTextBoxExtensionsSpecs.cs
@@ -7,27 +7,26 @@ namespace MoMoney.Presentation.Winforms.Helpers
{
public class BindableTextBoxExtensionsSpecs
{
- }
-
- [Concern(typeof (BindableTextBoxExtensions))]
- public class when_binding_a_text_control_to_a_command : concerns
- {
- it should_run_each_command_when_the_text_changes_in_the_text_control = () => command.was_told_to<ITextBoxCommand<string>>(x => x.run(result));
+ [Concern(typeof (BindableTextBoxExtensions))]
+ public class when_binding_a_text_control_to_a_command : concerns
+ {
+ it should_run_each_command_when_the_text_changes_in_the_text_control = () => command.was_told_to(x => x.run(result));
- context c = () =>
- {
- textbox = new TextBox();
- command = an<ITextBoxCommand<string>>();
- };
+ context c = () =>
+ {
+ textbox = new TextBox();
+ command = an<ITextBoxCommand<string>>();
+ };
- because b = () =>
- {
- result = new TextControl<string>(textbox).apply(command);
- textbox.control_is(x => x.OnLeave(new EventArgs()));
- };
+ because b = () =>
+ {
+ result = new TextControl<string>(textbox).apply(command);
+ textbox.control_is(x => x.OnLeave(new EventArgs()));
+ };
- static TextBox textbox;
- static ITextBoxCommand<string> command;
- static IBindableTextBox<string> result;
+ static TextBox textbox;
+ static ITextBoxCommand<string> command;
+ static IBindableTextBox<string> result;
+ }
}
}
\ No newline at end of file
product/Presentation/Winforms/Views/AddBillPaymentView.Designer.cs
@@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddBillPaymentView));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(AddBillPaymentView));
this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
this.kryptonSplitContainer1 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
product/Presentation/Winforms/Views/AddCompanyView.Designer.cs
@@ -28,7 +28,7 @@ namespace MoMoney.Presentation.Winforms.Views
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddCompanyView));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(AddCompanyView));
this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
this.ux_companys_listing = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonSplitContainer2 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
product/Presentation/Winforms/Views/AddNewIncomeView.Designer.cs
@@ -28,7 +28,7 @@ namespace MoMoney.Presentation.Winforms.Views
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddNewIncomeView));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(AddNewIncomeView));
this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
this.kryptonSplitContainer1 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
this.kryptonLabel2 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
product/Presentation/Winforms/Views/ApplicationShell.Designer.cs
@@ -29,21 +29,21 @@ namespace MoMoney.Presentation.Winforms.Views
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
- WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
- WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
- WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
+ var autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
+ var dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ var tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
+ var dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
+ var tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ var tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
+ var tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ var tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ var tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
this.ux_main_menu_strip = new System.Windows.Forms.MenuStrip();
this.ux_status_bar = new System.Windows.Forms.StatusStrip();
this.status_bar_progress_bar = new System.Windows.Forms.ToolStripProgressBar();
product/Presentation/Winforms/Views/ViewAllBills.Designer.cs
@@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBills));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBills));
this.kryptonGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonGroup();
this.ux_bills = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
product/Presentation/Winforms/Views/ViewAllBillsReport.Designer.cs
@@ -27,7 +27,7 @@ namespace MoMoney.Presentation.Winforms.Views
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBillsReport));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBillsReport));
this.pageHeader = new DataDynamics.ActiveReports.PageHeader();
this.detail = new DataDynamics.ActiveReports.Detail();
this.ux_company_name = new DataDynamics.ActiveReports.RichTextBox();
product/Presentation/Winforms/Views/ViewAllIncome.Designer.cs
@@ -28,7 +28,7 @@ namespace MoMoney.Presentation.Winforms.Views
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllIncome));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllIncome));
this.ux_view_all_income = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
((System.ComponentModel.ISupportInitialize)(this.ux_view_all_income)).BeginInit();
product/Presentation/Winforms/Views/ViewAllIncomesReport.Designer.cs
@@ -27,7 +27,7 @@ namespace MoMoney.Presentation.Winforms.Views
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBillsReport));
+ var resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBillsReport));
this.pageHeader = new DataDynamics.ActiveReports.PageHeader();
this.detail = new DataDynamics.ActiveReports.Detail();
this.ux_company_name = new DataDynamics.ActiveReports.RichTextBox();
product/Service/Infrastructure/Eventing/EventAggregatorSpecs.cs
@@ -14,32 +14,32 @@ namespace MoMoney.Service.Infrastructure.Eventing
}
}
- [Concern(typeof(EventAggregator))]
+ [Concern(typeof (EventAggregator))]
public class when_a_event_is_raised_in_the_system : behaves_like_event_aggregator
{
it should_notify_all_subscribers_of_the_event = () =>
- {
- first_subscriber.was_told_to<IEventSubscriber<TestEvent>>(x => x.notify(message));
- second_subscriber.was_told_to(x => x.notify(message));
- };
+ {
+ first_subscriber.was_told_to(x => x.notify(message));
+ second_subscriber.was_told_to(x => x.notify(message));
+ };
it should_not_notify_any_subscribers_that_subscribed_to_a_different_event =
() => incorrect_subscriber.was_not_told_to(x => x.notify(Arg<AnotherEvent>.Is.Anything));
context c = () =>
- {
- message = new TestEvent();
- first_subscriber = an<IEventSubscriber<TestEvent>>();
- second_subscriber = an<IEventSubscriber<TestEvent>>();
- incorrect_subscriber = an<IEventSubscriber<AnotherEvent>>();
- };
+ {
+ message = new TestEvent();
+ first_subscriber = an<IEventSubscriber<TestEvent>>();
+ second_subscriber = an<IEventSubscriber<TestEvent>>();
+ incorrect_subscriber = an<IEventSubscriber<AnotherEvent>>();
+ };
because b = () =>
- {
- sut.subscribe_to(first_subscriber);
- sut.subscribe(second_subscriber);
- sut.publish(message);
- };
+ {
+ sut.subscribe_to(first_subscriber);
+ sut.subscribe(second_subscriber);
+ sut.publish(message);
+ };
static TestEvent message;
static IEventSubscriber<TestEvent> first_subscriber;
@@ -47,33 +47,29 @@ namespace MoMoney.Service.Infrastructure.Eventing
static IEventSubscriber<AnotherEvent> incorrect_subscriber;
}
- [Concern(typeof(EventAggregator))]
+ [Concern(typeof (EventAggregator))]
public class when_publishing_a_call_to_all_subscribers : behaves_like_event_aggregator
{
it should_make_the_call_on_each_subscriber = () => connection.was_told_to(x => x.ChangeDatabase("localhost"));
context c = () =>
- {
- connection = an<IDbConnection>();
- command = an<IDbCommand>();
- };
+ {
+ connection = an<IDbConnection>();
+ command = an<IDbCommand>();
+ };
because b = () =>
- {
- sut.subscribe(connection);
- sut.subscribe(command);
- sut.publish<IDbConnection>(x => x.ChangeDatabase("localhost"));
- };
+ {
+ sut.subscribe(connection);
+ sut.subscribe(command);
+ sut.publish<IDbConnection>(x => x.ChangeDatabase("localhost"));
+ };
static IDbConnection connection;
static IDbCommand command;
}
- public class TestEvent : IEvent
- {
- }
+ public class TestEvent : IEvent {}
- public class AnotherEvent : IEvent
- {
- }
+ public class AnotherEvent : IEvent {}
}
\ No newline at end of file