public void FilePath_Ctor_AbsoluteButNotRooted()
        {
            const string path = "path";

            MockPathInteractor interactor = new MockPathInteractor(
                x => x,
                x => false);

            ArgumentException exception =
                Assert.ThrowsException <ArgumentException>(() => new FilePath(path, interactor));

            Assert.IsTrue(exception.Message.Contains(FilePath.InvalidPath));
        }
        public void FilePath_Ctor_PathNotAbsolute()
        {
            const string noRoot = "example.txt";
            const string root   = @"C:\example.txt";

            MockPathInteractor interactor = new MockPathInteractor(
                x => root,
                x => true);

            ArgumentException exception =
                Assert.ThrowsException <ArgumentException>(() => new FilePath(noRoot, interactor));

            Assert.IsTrue(exception.Message.Contains(FilePath.InvalidPath));
        }
        public void FilePath_Ctor_NullPath()
        {
            MockPathInteractor interactor = new MockPathInteractor(null, null);

            Assert.ThrowsException <ArgumentNullException>(() => new FilePath(null, interactor));
        }
 public static void ClassInitialize(TestContext context)
 {
     FilePathTests.interactor = new MockPathInteractor(x => x, x => true);
 }