예제 #1
0
        protected override void beforeEach()
        {
            theSettings = new ApplicationSettings();

            MockFor <IApplicationSourceFinder>().Stub(x => x.FindSource(null, null))
            .Constraints(Is.Same(theSettings),
                         Is.TypeOf <ApplicationStartResponse>())
            .Return(null);


            theResponse = ClassUnderTest.StartApplication(theSettings, null);
        }
예제 #2
0
        protected override void beforeEach()
        {
            theSettings = new ApplicationSettings();
            theSource   = MockFor <IApplicationSource>();
            theReset    = new ManualResetEvent(true);

            Services.PartialMockTheClassUnderTest();
            ClassUnderTest.Expect(x => x.StartApplication(theSource, theSettings, theReset));

            MockFor <IApplicationSourceFinder>().Stub(x => x.FindSource(null, null))
            .Constraints(Is.Same(theSettings),
                         Is.TypeOf <ApplicationStartResponse>())
            .Return(theSource);


            theResponse = ClassUnderTest.StartApplication(theSettings, theReset);
        }
예제 #3
0
 protected override void beforeEach()
 {
     _theTypeFinder = MockFor <IApplicationSourceTypeFinder>();
     theResponse    = new ApplicationStartResponse();
 }