public void matches_by_fixture_node() { var fixture1 = new FixtureGraph("fixture1"); var fixture2 = new FixtureGraph("fixture2"); var screen1 = new FixtureNodePresenter(new StubFixtureNodeView(), fixture1, new UsageService()); var screen2 = new FixtureNodePresenter(new StubFixtureNodeView(), fixture2, new UsageService()); var subject = new FixtureNodeSubject(fixture1); subject.Matches(screen1).ShouldBeTrue(); subject.Matches(screen2).ShouldBeFalse(); var randomScreen = MockRepository.GenerateMock<IScreen>(); subject.Matches(randomScreen).ShouldBeFalse(); }
public void SetUp() { container = new Container(x => { x.For<IFixtureNodeView>().Use<FixtureNodeView>(); x.For<IScreen<IFixtureNode>>().Use<FixtureNodePresenter>(); }); factory = new ScreenFactory(container); fixture = new FixtureGraph("fixture1"); subject = new FixtureNodeSubject(fixture); thePresenter = subject.CreateScreen(factory).ShouldBeOfType<FixtureNodePresenter>(); }
public void matches_by_fixture_node() { var fixture1 = new FixtureStructure("fixture1"); var fixture2 = new FixtureStructure("fixture2"); var screen1 = new FixtureNodePresenter(null, fixture1); var screen2 = new FixtureNodePresenter(null, fixture2); var subject = new FixtureNodeSubject(fixture1); subject.Matches(screen1).ShouldBeTrue(); subject.Matches(screen2).ShouldBeFalse(); var randomScreen = MockRepository.GenerateMock<IScreen>(); subject.Matches(randomScreen).ShouldBeFalse(); }
public void SetUp() { container = new Container(x => { x.For <IFixtureNodeView>().Use <FixtureNodeView>(); x.For <IScreen <IFixtureNode> >().Use <FixtureNodePresenter>(); }); factory = new ScreenFactory(container); fixture = new FixtureGraph("fixture1"); subject = new FixtureNodeSubject(fixture); thePresenter = subject.CreateScreen(factory).ShouldBeOfType <FixtureNodePresenter>(); }
public void matches_by_fixture_node() { var fixture1 = new FixtureGraph("fixture1"); var fixture2 = new FixtureGraph("fixture2"); var screen1 = new FixtureNodePresenter(null, fixture1); var screen2 = new FixtureNodePresenter(null, fixture2); var subject = new FixtureNodeSubject(fixture1); subject.Matches(screen1).ShouldBeTrue(); subject.Matches(screen2).ShouldBeFalse(); var randomScreen = MockRepository.GenerateMock <IScreen>(); subject.Matches(randomScreen).ShouldBeFalse(); }
public void SetUp() { ProjectContext context = new ProjectContext(); context.Hierarchy = DataMother.GrammarProject().LoadTests(); context.Library = DataMother.GrammarsProjectRunner().GetLibary(); UsageService service = new UsageService(context); container = new Container(x => { x.For<IFixtureNodeView>().Use<StubFixtureNodeView>(); x.For<IScreen<IFixtureNode>>().Use<FixtureNodePresenter>(); x.For<UsageService>().Use(service); }); factory = new ScreenFactory(container); fixture = context.Library.FixtureFor("Composite"); subject = new FixtureNodeSubject(fixture); thePresenter = subject.CreateScreen(factory).ShouldBeOfType<FixtureNodePresenter>(); thePresenter.Activate(null); }