Esempio n. 1
0
        public void GetJumpsToRoot()
        {
            var path =
                @"H:\Users\Tom\AppData\Roaming\.minecraft\libraries\net\minecraftforge\forge\1.10.2-12.18.3.2185";

            Assert.AreEqual(PathsHelper.GetJumpsToRoot(path), 10);

            path = "H:";
            Assert.AreEqual(PathsHelper.GetJumpsToRoot(path), 0);

            path = @"H:\10";
            Assert.AreEqual(PathsHelper.GetJumpsToRoot(path), 1);
        }