Esempio n. 1
0
            public void Setup()
            {
                PathSelectorUnderTest = new SimplePathSelector(
                    typeof(DummyClass1),
                    typeof(DummyClass2),
                    typeof(DummyClass3),
                    typeof(NoPathAvailableDummy),
                    typeof(InvalidPathDummy));

                PathSelectorUnderTest.AddProvider(new NoPathAvailableDummy());
                PathSelectorUnderTest.AddProvider(new DummyClass3());
                PathSelectorUnderTest.AddProvider(new DummyClass2());
                PathSelectorUnderTest.AddProvider(new DummyClass1());
            }
Esempio n. 2
0
            public void SilenceInvalidPathExceptionFromProvider()
            {
                PathSelectorUnderTest.AddProvider(new InvalidPathDummy());
                PathSelectorUnderTest.SilenceInvalidPathExceptions = true;

                PathSelectorUnderTest.SelectPath();
            }
Esempio n. 3
0
            public void SelectPathTest1()
            {
                PathSelectorUnderTest.AddProvider(new DummyClass1());

                var selectedPath = PathSelectorUnderTest.SelectPath();

                Assert.AreEqual("DummyClass1", selectedPath);
            }