Exemplo n.º 1
0
        public void TestSize()
        {
            FileAction fileAction = new FileAction(
                new VersionProperty(fileDetails),
                new SizeProperty(fileDetails),
                new DataGenerator()
                );

            var randomVersion = fileAction.GetRandomSize();
            var size          = fileAction.PerformAction(randomVersion, "C:/file.txt");

            Assert.IsFalse(size.Contains("."));
        }
Exemplo n.º 2
0
        public void NegativeSizeTest()
        {
            FileAction fileAction = new FileAction(
                new VersionProperty(fileDetails),
                new SizeProperty(fileDetails),
                new DataGenerator()
                );

            try
            {
                fileAction.PerformAction("ss", "C:/file.txt");
            }
            catch (Exception e)
            {
                Assert.AreEqual(e.Message, "No Such Data with ss Present");
            }
        }