Ejemplo n.º 1
0
        public void Chaddr_NullAttr_Exception()
        {
            using var test = new TestFS(Test3ArchiveUrl, BaseTestFolder);

            var ddbPath = test.TestFolder;

            Action act = () => DroneDB.ChangeAttributes(ddbPath, null);

            act.Should().Throw <ArgumentException>();
        }
Ejemplo n.º 2
0
        public void Chaddr_HappyPath_Ok()
        {
            using var test = new TestFS(Test3ArchiveUrl, BaseTestFolder);

            var ddbPath = Path.Combine(test.TestFolder);

            var res = DroneDB.ChangeAttributes(ddbPath, new Dictionary <string, object> {
                { "public", true }
            });

            res["public"].Should().Be(true);

            res = DroneDB.ChangeAttributes(ddbPath, new Dictionary <string, object> {
                { "public", false }
            });

            res["public"].Should().Be(false);
        }