Ejemplo n.º 1
0
        public void ShouldReturnCorrectExceptionForBadInput()
        {
            string input = string.Empty;
            IFileReader reader = new FileReader();

            ArgumentException ex = Assert.Throws<ArgumentNullException>(() => reader.TryGetFile(input));

            Assert.Equal("path", ex.ParamName);
        }
Ejemplo n.º 2
0
        public void ShouldNotReturnTrueIfPathDoesNotExist()
        {
            string path = @"C:\Users\Nino\Desktop\test2";

            IFileReader fileReader = new FileReader();
            var result = fileReader.TryGetFile(path);

            Assert.Equal(false, result);
        }