Esempio n. 1
0
        public void Test___Method_Check___False()
        {
            var path = Path.Combine(Path.GetTempPath(), GetType().Name, "foo.txt");

            var testee = new FileExistsCondition()
            {
                Path = new AnyVariable <string>()
                {
                    Value = path
                }
            };

            Assert.IsFalse(testee.Check());
        }
Esempio n. 2
0
        public void Execute_ExistingFileButNotEmpty_True()
        {
            var fileArgs = new FileExistsConditionArgs
                           (
                @"Temp\",
                new LiteralScalarResolver <string>(@"Target"),
                new LiteralScalarResolver <string>(@"myFile.txt"),
                new LiteralScalarResolver <bool>(true)
                           );

            var condition = new FileExistsCondition(fileArgs);

            Assert.That(condition.Validate(), Is.True);
        }