public void ToStringTest()
        {
            string expected = "Unit Test";

            StringKey stringKey = new StringKey(expected);

            Assert.AreEqual(expected, stringKey.ToString());
        }
Exemple #2
0
        public static void ToStringTest()
        {
            string    expectedString = "KeyName: stop HashCode: 3446974";
            StringKey stringKey      = new StringKey("stop");

            // NOTE: this may differ from your tests, you may ignore this test!
            // THIS IS A GOOD IDEA FOR TESTING HOWEVER, YOU *SHOULD* DO IT ANYWAY.
            Assert.AreEqual(expectedString, stringKey.ToString());
        }
Exemple #3
0
 public static string Get(StringKey key)
 {
     try
     {
         return(App.Current.Resources[key.ToString()].ToString());
     }
     catch (Exception)
     {
         return("");
     }
 }
Exemple #4
0
        bool IDictionary <string, BinaryContainer> .TryGetValue(string key, out BinaryContainer value)
        {
            var k = new StringKey(key);

            if (!Exists(k))
            {
                value = null;
                return(false);
            }

            value = this[k.ToString()];
            return(true);
        }
Exemple #5
0
 public BinaryContainer Open(StringKey key) => this[key.ToString()];
 public void ToStringSuccess()
 {
     Assert.AreEqual(sk.ToString(), keyName);
     Assert.AreNotEqual(sk.ToString(), " ");
 }