main
1using gorilla.utility;
2using Machine.Specifications;
3using Rhino.Mocks;
4using solidware.financials.windows.ui;
5using solidware.financials.windows.ui.events;
6using solidware.financials.windows.ui.presenters;
7using solidware.financials.windows.ui.presenters.specifications;
8
9namespace specs.unit.ui.presenters.specifications
10{
11 public class IfFamilyMemberIsSelectedSpecs
12 {
13 public abstract class concern
14 {
15 Establish context = () =>
16 {
17 state = Create.dependency<ApplicationState>();
18 sut = new IfFamilyMemberIsSelected<Presenter>(state);
19 };
20
21 static protected Specification<AddNewIncomeViewModel> sut;
22 static protected ApplicationState state;
23 }
24
25 public class when_a_family_member_has_been_selected : concern
26 {
27 It should_return_true = () =>
28 {
29 sut.is_satisfied_by(null).ShouldBeTrue();
30 };
31
32 Establish context = () =>
33 {
34 state.Stub(x => x.HasBeenPushedIn<SelectedFamilyMember>()).Return(true);
35 };
36 }
37
38 public class when_a_family_member_has_not_been_selected : concern
39 {
40 It should_return_false = () =>
41 {
42 sut.is_satisfied_by(null).ShouldBeFalse();
43 };
44 }
45 }
46}