Ejemplo n.º 1
0
        public void DeletingNullListFails()
        {
            var item = new ConfigEnvironment(new EnvironmentIdentifier("Foo", "Bar"));

            var result = item.DeleteKeys(null);

            Assert.True(result.IsError, "result.IsError");
        }
Ejemplo n.º 2
0
        public void DeletingInvalidKeysFails()
        {
            var item = new ConfigEnvironment(new EnvironmentIdentifier("Foo", "Bar"));

            item.UpdateKeys(new List <ConfigEnvironmentKey> {
                new ConfigEnvironmentKey("Foo", "Bar", "", "", 0)
            });

            Assert.NotEmpty(item.Keys);

            var result = item.DeleteKeys(new List <string> {
                "Baz"
            });

            Assert.True(result.IsError, "result.IsError");
        }
Ejemplo n.º 3
0
        public void DeleteKeysChangesValues()
        {
            var item = new ConfigEnvironment(new EnvironmentIdentifier("Foo", "Bar"));

            item.UpdateKeys(new List <ConfigEnvironmentKey> {
                new ConfigEnvironmentKey("Foo", "Bar", "", "", 0)
            });

            Assert.NotEmpty(item.Keys);

            item.DeleteKeys(new List <string> {
                "Foo"
            });

            Assert.Empty(item.Keys);
        }