Beispiel #1
0
 public void TestEnsureContainerPath(string path, string result)
 {
     if (result == null)
     {
         Assert.Throws <ArgumentException>(() => PathHelper.IsContainerPath(path));
     }
     else
     {
         Assert.AreEqual(PathHelper.EnsureContainerPath(path), result);
     }
 }
Beispiel #2
0
        public void TestIsContainerPath(string path, bool?state)
        {
            switch (state)
            {
            case null:
                Assert.Throws <ArgumentException>(() => PathHelper.IsContainerPath(path));
                break;

            case true:
                Assert.AreEqual(PathHelper.IsContainerPath(path), true);
                break;

            case false:
                Assert.AreEqual(PathHelper.IsContainerPath(path), false);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(state), state, null);
            }
        }