Beispiel #1
0
        //[ExpectedException(typeof(ArgumentNullException))] // Value is allowed
        public void CreateFileWithNullValue()
        {
            // Setup
            var pathTree = new PathTree <string>();
            var file     = new PathFile <string>(pathTree, "\\this\\is\\a\\file.txt");

            // Execute
            file.Create(a_value: null);
        }
Beispiel #2
0
        public void CreateFile()
        {
            // Setup
            var pathTree = new PathTree <string>();
            var file     = new PathFile <string>(pathTree, "\\this\\is\\a\\file.txt");

            // Execute
            file.Create("Value");

            // Assert
            Assert.IsTrue(file.Exists);
            Assert.AreEqual("Value", file.Value);
        }
Beispiel #3
0
        public void DeleteFile()
        {
            // Setup
            var pathTree = new PathTree <string>();
            var file     = new PathFile <string>(pathTree, "\\this\\is\\a\\file.txt");

            file.Create("Value");

            // Execute
            file.Delete();

            // Assert
            Assert.IsFalse(file.Exists);
        }
Beispiel #4
0
        public void DeleteFile()
        {
            // Setup
            var pathTree = new PathTree<string>();
            var file = new PathFile<string>(pathTree, "\\this\\is\\a\\file.txt");
            file.Create("Value");

            // Execute
            file.Delete();

            // Assert
            Assert.IsFalse(file.Exists);
        }
Beispiel #5
0
        public void CreateFileWithNullValue()
        {
            // Setup
            var pathTree = new PathTree<string>();
            var file = new PathFile<string>(pathTree, "\\this\\is\\a\\file.txt");

            // Execute
            file.Create(a_value: null);
        }
Beispiel #6
0
        public void CreateFile()
        {
            // Setup
            var pathTree = new PathTree<string>();
            var file = new PathFile<string>(pathTree, "\\this\\is\\a\\file.txt");

            // Execute
            file.Create("Value");

            // Assert
            Assert.IsTrue(file.Exists);
            Assert.AreEqual("Value", file.Value);
        }