public void TestJavaPropertiesSaveAndLoad()
 {
     JavaProperties props = new JavaProperties();
     JavaProperties props1 = new JavaProperties();
     props.Add("a=", "b=\"''");
     props.Store("c:\\tempPropFileCsharp.txt", "comment1");
     props1.Load("c:\\tempPropFileCsharp.txt");
     File.Delete("c:\\tempPropFileCsharp.txt");
     Assert.AreEqual(props1["a="], props["a="]);
 }
Example #2
0
 public void Serialize(object obj, Stream writer)
 {
     try {
         JavaProperties props = new JavaProperties();
         SerializeFields(emptyPrefix, obj, props);
         props.Store(writer, null);
     } catch (IOException e) {
         throw new TeseWriteException(e);
     }
 }
Example #3
0
        public void TestJavaPropertiesSaveAndLoad()
        {
            JavaProperties props  = new JavaProperties();
            JavaProperties props1 = new JavaProperties();

            props.Add("a=", "b=\"''");
            props.Store("c:\\tempPropFileCsharp.txt", "comment1");
            props1.Load("c:\\tempPropFileCsharp.txt");
            File.Delete("c:\\tempPropFileCsharp.txt");
            Assert.AreEqual(props1["a="], props["a="]);
        }