示例#1
0
        public void op_Load_string_whenFile()
        {
            using (var temp = new TempDirectory())
            {
                var expected = temp
                               .Info
                               .ToFile("example.txt")
                               .AppendLine(string.Empty)
                               .FullName;

                var actual = new FileSpec(expected).First().FullName;

                Assert.Equal(expected, actual);
            }
        }
示例#2
0
        public void op_Load_string_whenFileSearch()
        {
            using (var temp = new TempDirectory())
            {
                var expected = temp
                               .Info
                               .ToFile("example.txt")
                               .AppendLine(string.Empty)
                               .FullName;

                var name = @"{0}\*.txt".FormatWith(temp.Info.FullName);

                var actual = new FileSpec(name).First().FullName;

                Assert.Equal(expected, actual);
            }
        }