Inheritance: WeifenLuo.WinFormsUI.Docking.DockContent
Beispiel #1
0
 public void AddRange(BaseWindow[] uiWindow)
 {
     foreach (Form uW in uiWindow)
     {
         this.List.Add(uW);
     }
 }
Beispiel #2
0
 public void IndexingByObjectReturnsTheCorrectObject()
 {
     BaseWindow window1 = new BaseWindow();
     BaseWindow window2 = new BaseWindow();
     _windowList.Add(window1);
     _windowList.Add(window2);
     Assert.That(_windowList[window1], Is.EqualTo(window1));
 }
Beispiel #3
0
 public void ItemIsNotInListAfterBeingRemoved()
 {
     BaseWindow window1 = new BaseWindow();
     BaseWindow window2 = new BaseWindow();
     _windowList.Add(window1);
     _windowList.Add(window2);
     _windowList.Remove(window1);
     Assert.That(() => _windowList[window1], Throws.TypeOf<ArgumentOutOfRangeException>());
 }
Beispiel #4
0
 public void CountIsReducedAfterItemRemoved()
 {
     BaseWindow window1 = new BaseWindow();
     BaseWindow window2 = new BaseWindow();
     _windowList.Add(window1);
     _windowList.Add(window2);
     _windowList.Remove(window1);
     Assert.That(_windowList.Count, Is.EqualTo(1));
 }
Beispiel #5
0
 public void GetWindowFromStringReturnsCorrectObject()
 {
     BaseWindow window1 = new BaseWindow();
     window1.SetFormText("TheWindowWeWant");
     BaseWindow window2 = new BaseWindow();
     window2.SetFormText("WeDontWantThisWindow");
     _windowList.Add(window1);
     _windowList.Add(window2);
     Assert.That(_windowList.FromString("TheWindowWeWant"), Is.EqualTo(window1));
 }
Beispiel #6
0
 public void Remove(BaseWindow uiWindow)
 {
     this.List.Remove(uiWindow);
 }
Beispiel #7
0
 public void Add(BaseWindow uiWindow)
 {
     this.List.Add(uiWindow);
     //AddHandler uiWindow.FormClosing, AddressOf uiFormClosing
 }
Beispiel #8
0
 public void Remove(BaseWindow uiWindow)
 {
     this.List.Remove(uiWindow);
 }
Beispiel #9
0
 public void Add(BaseWindow uiWindow)
 {
     this.List.Add(uiWindow);
     //AddHandler uiWindow.FormClosing, AddressOf uiFormClosing
 }
Beispiel #10
0
 public void ListIsEmptyAfterLastItemRemoved()
 {
     BaseWindow window1 = new BaseWindow();
     _windowList.Add(window1);
     _windowList.Remove(window1);
     Assert.That(_windowList, Is.Empty);
 }
Beispiel #11
0
 public void WindowsAreInListAfterCallingAddRange()
 {
     BaseWindow window1 = new BaseWindow();
     BaseWindow window2 = new BaseWindow();
     BaseWindow window3 = new BaseWindow();
     BaseWindow[] windowArray = new BaseWindow[] {window1, window2, window3};
     _windowList.AddRange(windowArray);
     Assert.That(_windowList, Contains.Item(window1));
     Assert.That(_windowList, Contains.Item(window2));
     Assert.That(_windowList, Contains.Item(window3));
 }
Beispiel #12
0
 public void WindowIsInListAfterBeingAdded()
 {
     BaseWindow window = new BaseWindow();
     _windowList.Add(window);
     Assert.That(_windowList, Has.Member(window));
 }
Beispiel #13
0
 public void ThrowsExceptionWhenIndexingPastListBounds()
 {
     BaseWindow window1 = new BaseWindow();
     _windowList.Add(window1);
     Assert.That(() => _windowList[100], Throws.TypeOf<ArgumentOutOfRangeException>());
 }
Beispiel #14
0
 public void ThrowsExceptionWhenIndexingByObjectFails()
 {
     BaseWindow window1 = new BaseWindow();
     Assert.That(() => _windowList[window1], Throws.TypeOf<ArgumentOutOfRangeException>());
 }