public void ToStringTest() { string expected = "Unit Test"; StringKey stringKey = new StringKey(expected); Assert.AreEqual(expected, stringKey.ToString()); }
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()); }
public static string Get(StringKey key) { try { return(App.Current.Resources[key.ToString()].ToString()); } catch (Exception) { return(""); } }
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); }
public BinaryContainer Open(StringKey key) => this[key.ToString()];
public void ToStringSuccess() { Assert.AreEqual(sk.ToString(), keyName); Assert.AreNotEqual(sk.ToString(), " "); }