コード例 #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());
            }
コード例 #2
0
            public void SilenceInvalidPathExceptionFromProvider()
            {
                PathSelectorUnderTest.AddProvider(new InvalidPathDummy());
                PathSelectorUnderTest.SilenceInvalidPathExceptions = true;

                PathSelectorUnderTest.SelectPath();
            }
コード例 #3
0
            public void SelectPathTest1()
            {
                PathSelectorUnderTest.AddProvider(new DummyClass1());

                var selectedPath = PathSelectorUnderTest.SelectPath();

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