Exemplo n.º 1
0
        public void run_the_tests()
        {
            ClassUnderTest.RunAllTests();

            MockFor <IFileSystem>().AssertWasCalled(x => x.DeleteFolder(setup.ResultsFolder));
            MockFor <IFileSystem>().AssertWasCalled(x => x.CreateFolder(setup.ResultsFolder));

            MockFor <IResultsSummary>().AssertWasCalled(x => x.Start(null, DateTime.Now),
                                                        o =>
            {
                o.Constraints(Is.Equal("All Tests in the directory"),
                              Is.TypeOf <DateTime>());
            });

            MockFor <ITestRunner>().AssertWasCalled(x => x.RunTests(tests, ClassUnderTest));
            MockFor <IResultsSummary>().AssertWasCalled(x => x.WriteFile(setup.ResultsFile));
        }
Exemplo n.º 2
0
        public void CreateMemoryMementoSourceWhenTheMementoSourceIsExplicitlyDefinedInAttribute()
        {
            var mocks  = new MockRepository();
            var family = mocks.DynamicMock <IPluginFamily>();

            using (mocks.Record())
            {
                SetupResult.For(family.PluginType).Return(typeof(TypeWithDesignatedMementoSource));

                family.AddMementoSource(null);
                LastCall.Constraints(Is.TypeOf <CustomMementoSource>());
            }

            using (mocks.Playback())
            {
                PluginFamilyAttribute.ConfigureFamily(family);
            }
        }
Exemplo n.º 3
0
 public void should_direct_the_status_bar_to_show_the_recycle_was_finished_and_failed()
 {
     MockFor <IStatusView>().AssertWasCalled(x => x.MarkCycleTime(DateTime.Now, false), x => x.Constraints(Is.TypeOf <DateTime>(), Is.Equal(false)));
 }