예제 #1
0
        public void AreValidSourcesShouldReturnFalseIfValidSourceExtensionsIsEmpty()
        {
            this.testablePlatformServiceProvider.MockTestSourceValidator.SetupGet(ts => ts.ValidSourceExtensions).Returns(new List <string> {
            });
            MSTestDiscoverer discoverer = new MSTestDiscoverer();

            Assert.IsFalse(discoverer.AreValidSources(new List <string> {
                "dummy.te"
            }));
        }
예제 #2
0
        public void AreValidSourcesShouldThrowIfPlatformsValidSourceExtensionsIsNull()
        {
            this.testablePlatformServiceProvider.MockTestSourceValidator.SetupGet(ts => ts.ValidSourceExtensions).Returns((List <string>)null);
            MSTestDiscoverer discoverer = new MSTestDiscoverer();

            Action a = () => discoverer.AreValidSources(new List <string> {
                "dummy"
            });

            ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(ArgumentNullException));
        }