public void TestFullItemName() { Assert.AreEqual("test", m_Custom.FullName); var subItem = new CustomPanelItem(m_Custom, "hello"); Assert.AreEqual("hello", subItem.FullName); }
public void TestCtor() { var dot = new PanelItemDoubleDot(null); Assert.AreEqual(PanelImageNames.DOUBLEDOT, dot.ImageName); var item = new CustomPanelItem(null, "TEST"); Assert.AreEqual(-1, dot.CompareTo(item)); Assert.AreEqual(1, dot.CompareTo(null)); Assert.AreEqual(1, item.CompareTo(dot)); Assert.AreEqual(1, item.CompareTo(null)); Assert.AreEqual(0, dot.CompareTo(new PanelItemDoubleDot(null))); }
public void TestDictionaryCS() { m_Item.Name = "hello"; var item2 = new CustomPanelItem(null, "hello"); var item3 = new CustomPanelItem(null, "hi"); var dict = new Dictionary <PanelItemBase, int>(); dict.Add(m_Item, 1); int result; Assert.IsTrue(dict.TryGetValue(m_Item, out result)); Assert.IsTrue(dict.TryGetValue(item2, out result)); Assert.IsFalse(dict.TryGetValue(item3, out result)); }
public void SetUp() { m_Item = new CustomPanelItem(null, string.Empty); }
public void SetUp() { m_Custom = new CustomPanelItem(null, "test"); }