public void TestReadAllOptionsReplaceValueInFile()
        {
            var vshelper = new VsPropertiesHelper(null) { ApplicationDataUserSettingsFile = FileName };
            vshelper.WriteOptionInApplicationData("key", "data", "value");
            vshelper.WriteOptionInApplicationData("key", "data1", "value1");
            vshelper.WriteOptionInApplicationData("key", "data2", "value2");
            vshelper.WriteOptionInApplicationData("key1", "data3", "value3");

            var value = vshelper.ReadAllOptionsForPluginOptionInApplicationData("key");
            Assert.AreEqual(3, value.Count);
            Assert.AreEqual("value", value["data"]);
            Assert.AreEqual("value1", value["data1"]);
            Assert.AreEqual("value2", value["data2"]);
        }
        public void TestReadAllOptionsWithMultipleDefinedKeysInFile()
        {
            var vshelper = new VsPropertiesHelper(null) { ApplicationDataUserSettingsFile = FileName };

            using (var writer = new StreamWriter(FileName))
            {
                writer.Write("key=data,value\r\n");
                writer.Write("key=data,value1\r\n");
                writer.Write("key=data,value2\r\n");
            }

            var value = vshelper.ReadAllOptionsForPluginOptionInApplicationData("key");
            Assert.AreEqual(1, value.Count);
            Assert.AreEqual("value", value["data"]);
        }
 public void TestSetAllOptions()
 {
     var vshelper = new VsPropertiesHelper(null) { ApplicationDataUserSettingsFile = FileName };
     var options = new Dictionary<string, string>
                       {
                           { "data", "value" },
                           { "data1", "value1" },
                           { "data2", "value2" },
                           { "data3", "value3" }
                       };
     vshelper.WriteAllOptionsForPluginOptionInApplicationData("key", options);
     var value = vshelper.ReadAllOptionsForPluginOptionInApplicationData("key");
     Assert.AreEqual(4, value.Count);
     Assert.AreEqual("value", value["data"]);
     Assert.AreEqual("value1", value["data1"]);
     Assert.AreEqual("value2", value["data2"]);
     Assert.AreEqual("value3", value["data3"]);
 }