All pastes #13905 Raw Edit

Unnamed

public text v1 · immutable
#13905 ·published 2005-06-10 18:58 UTC
rendered paste body
		public static bool Test (string path)
		{
			const string test_key = "__test_key__";
			const string test_value = "__test_value__";

			try {
				Set (path, test_key, test_value);
				if (Get (path, test_key) != test_value) {
					Console.WriteLine ("value mismatch");
					return false;
				}
				Remove (path, test_key);
				Console.WriteLine ("Checking empty key");
				return Get (path, test_key) == null;

			} catch (Exception ex) {
				Console.WriteLine (ex);
				return false;
			}
		}