Пример #1
0
        public void TestManifestBasedCtorArgumentValidation()
        {
            AssertThrows <ArgumentException>(() => Runfiles.CreateManifestBasedForTesting(null));
            AssertThrows <ArgumentException>(() => Runfiles.CreateManifestBasedForTesting(""));

            using var mf = new MockFile("a b");
            Runfiles.CreateManifestBasedForTesting(mf.Path);
        }
Пример #2
0
        public void TestManifestBasedRlocation()
        {
            using var mf = new MockFile(
                      "Foo/runfile1 C:/Actual Path\\runfile1",
                      "Foo/Bar/runfile2 D:\\the path\\run file 2.txt");

            var r = Runfiles.CreateManifestBasedForTesting(mf.Path);

            r.Rlocation("Foo/runfile1").Should().Be("C:/Actual Path\\runfile1");
            r.Rlocation("Foo/Bar/runfile2").Should().Be("D:\\the path\\run file 2.txt");
            r.Rlocation("unknown").Should().BeNull();
        }