コード例 #1
0
ファイル: NtCore.cs プロジェクト: noahhusby/NetworkTables
        /// <summary>
        /// Gets if the table contains a specific entry
        /// </summary>
        /// <param name="name">The entry name</param>
        /// <returns>True if the entry exists, otherwise false</returns>
        public static bool ContainsEntry(string name)
        {
#if CORE
            return(CoreMethods.ContainsEntry(name));
#else
            return(GetType(name) != NtType.Unassigned);
#endif
        }
コード例 #2
0
        public void TestContainsKeySuccess()
        {
            string key1     = "testKey";
            string toWrite1 = "written";

            CoreMethods.SetEntryString(key1, toWrite1);

            Assert.That(CoreMethods.ContainsEntry(key1));
        }
コード例 #3
0
 public void TestContainsKeyNonExistentKey()
 {
     Assert.That(!CoreMethods.ContainsEntry("testKey"));
 }