예제 #1
0
        public void Execute_ExistingFolderButEmpty_True()
        {
            var folderArgs = new FolderExistsConditionArgs
                             (
                @"Temp\",
                new LiteralScalarResolver <string>(@"."),
                new LiteralScalarResolver <string>(@"Target"),
                new LiteralScalarResolver <bool>(true)
                             );

            var condition = new FolderExistsCondition(folderArgs);

            Assert.That(condition.Validate(), Is.False);
        }
예제 #2
0
        public void Execute_ExistingFolderButNotEmpty_True()
        {
            File.WriteAllText(@"Temp\Target\file.txt", "a little text");
            var folderArgs = new FolderExistsConditionArgs
                             (
                @"Temp\",
                new LiteralScalarResolver <string>(@"."),
                new LiteralScalarResolver <string>(@"Target"),
                new LiteralScalarResolver <bool>(true)
                             );

            var condition = new FolderExistsCondition(folderArgs);

            Assert.That(condition.Validate(), Is.True);
        }
예제 #3
0
 public FolderExistsCondition(FolderExistsConditionArgs args) => Args = args;