public void Constructors_Work() { IRichList<int> list1 = new RichList<int>(); Assert.That(list1, Is.TypeOf(typeof(RichList<int>))); IRichList<int> list2 = new RichList<int>(5); Assert.That(list2.Capacity, Is.EqualTo(5)); }
public void Correctly_Finds_All() { IRichList <int> ints = new RichList <int>(new int[] { 5, 10, 20 }); IRichList <int> smallInts = ints.FindAll(delegate(int i) { return(i < 11); }); Assert.That(smallInts, Is.EqualTo(new RichList <int>(new int[] { 5, 10 }))); }
public void Correctly_Finds_All() { IRichList<int> ints = new RichList<int>(new int[]{5, 10, 20}); IRichList<int> smallInts = ints.FindAll(delegate(int i) { return i < 11; }); Assert.That(smallInts, Is.EqualTo(new RichList<int>(new int[]{5, 10}))); }
public IncentiveProgram(IConfiguration configuration, INodeHistory history, RichList richList) { config = configuration; History = history; rich = richList; client = LyraRestClient.Create(config["network"], Environment.OSVersion.ToString(), "Nebula", "1.4"); }
public void Constructors_Work() { IRichList <int> list1 = new RichList <int>(); Assert.That(list1, Is.TypeOf(typeof(RichList <int>))); IRichList <int> list2 = new RichList <int>(5); Assert.That(list2.Capacity, Is.EqualTo(5)); }
public void Correctly_Gets_Range() { int[] ints = new int[] { 5, 10, 20 }; IRichList <int> list = new RichList <int>(ints); IRichList <int> range = list.GetRange(1, 2); Assert.That(range, Is.EqualTo(new RichList <int>(new int[] { 10, 20 }))); }
public void Correctly_Gets_Range() { int[] ints = new int[]{5, 10, 20}; IRichList<int> list = new RichList<int>(ints); IRichList<int> range = list.GetRange(1, 2); Assert.That(range, Is.EqualTo(new RichList<int>(new int[]{10, 20}))); }
public void Correctly_Converts_Items() { int[] ints = new int[] { 5, 10 }; long[] longs = new long[] { 5, 10 }; IRichList <int> list = new RichList <int>(ints); IRichList <long> longList = list.ConvertAll <long>( delegate(int input) { return((long)input); }); Assert.That(longList, Is.EqualTo(longs)); Assert.That(longList[0], Is.TypeOf(typeof(long))); Assert.That(longList[1], Is.TypeOf(typeof(long))); }
public void Correctly_Converts_Items() { int[] ints = new int[]{5, 10}; long[] longs = new long[] { 5, 10 }; IRichList<int> list = new RichList<int>(ints); IRichList<long> longList = list.ConvertAll<long>( delegate(int input) { return (long) input; }); Assert.That(longList, Is.EqualTo(longs)); Assert.That(longList[0], Is.TypeOf(typeof(long))); Assert.That(longList[1], Is.TypeOf(typeof(long))); }
public StripTabControl() { ///添加左边的选项卡选择按钮 LeftStrip = new TabStrip(); LeftStripWidth = 100; ///左侧按键的高度的显示正常是与此按钮有无文字有关 LeftStrip.Dock = DockStyle.Left; LeftStrip.AutoSize = false; LeftStrip.Width = LeftStripWidth; _mainPanel.Dock = DockStyle.Fill; ///初始化TabPages TabPages = new RichList <StripTabPage>(); TabPages.Inserted += new EventHandler <EventArgs <StripTabPage> >(TabPages_Inserted); TabPages.Removed += new EventHandler <EventArgs <StripTabPage> >(TabPages_Removed); this.Controls.Add(_mainPanel); this.Controls.Add(LeftStrip); }