Beispiel #1
0
            public void ThenMethodsArePutIntoCorrectArrays()
            {
                void SetupDummy()
                {
                }

                void TearDownDummy()
                {
                }

                DependenciesDummy dependencies  = new DependenciesDummy();
                FrameFactoryDummy frameFactory  = new FrameFactoryDummy();
                KarassFactory     karassFactory = new KarassFactory();
                Karass            karass        = karassFactory.Get(SetupDummy, TearDownDummy, Frames);

                Assert.NotNull(karass);
                Assert.True(karass.SetupActions[0].Contains(SetupDummy));
                Assert.True(karass.TeardownActions[0].Contains(TearDownDummy));
                Assert.AreEqual(karass.FramesCollection[0], Frames);
            }
Beispiel #2
0
            public void ThenMethodsArePutIntoCorrectArrays()
            {
                void SetupDummyOne()
                {
                }

                void SetupDummyTwo()
                {
                }

                void TearDownDummyOne()
                {
                }

                void TearDownDummyTwo()
                {
                }

                List <Action> setup = new List <Action>
                {
                    SetupDummyOne,
                    SetupDummyTwo
                };

                List <Action> teardown = new List <Action>
                {
                    TearDownDummyOne,
                    TearDownDummyTwo
                };

                DependenciesDummy dependencies  = new DependenciesDummy();
                FrameFactoryDummy frameFactory  = new FrameFactoryDummy();
                KarassFactory     karassFactory = new KarassFactory();
                Karass            karass        = karassFactory.Get(setup, teardown, Frames);

                Assert.NotNull(karass);

                Assert.AreEqual(karass.SetupActions[0], setup);
                Assert.AreEqual(karass.TeardownActions[0], teardown);
                Assert.AreEqual(karass.FramesCollection[0], Frames);
            }