public void TestCtorWithInitialCapacity()
 {
     this.names = new SimpleSortedList <string>(20);
     Assert.AreEqual(this.names.Capacity, 20);
     Assert.AreEqual(this.names.Size, 0);
 }
Пример #2
0
 public void TestAddingAllFromNullThrowsException()
 {
     this.names = new SimpleSortedList <string>();
     Assert.Throws <ArgumentNullException>(() => names.AddAll(null));
 }
 public void Setup()
 {
     this.names = new SimpleSortedList <string>();
 }
Пример #4
0
 public void TestRemovingNullThrowsException()
 {
     this.names = new SimpleSortedList <string>();
     this.names.AddAll(new string[] { "ivan", "nasko" });
     Assert.Throws <ArgumentNullException>(() => names.Remove(null));
 }
Пример #5
0
 public void TestAddIncreasesSize()
 {
     this.names = new SimpleSortedList <string>();
     this.names.Add("Nasko");
     Assert.AreEqual(1, this.names.Size);
 }
 public void SetUp()
 {
     this.names = new SimpleSortedList<string>(StringComparer.OrdinalIgnoreCase);
 }
        public void TestRemovingNullThrowsException()
        {
            this.names = new SimpleSortedList <string>();

            Assert.That(() => this.names.Remove(null), Throws.ArgumentNullException);
        }
Пример #8
0
 public void Init()
 {
     this.names = new SimpleSortedList <string>();
 }
Пример #9
0
 public void TestEmptyCtor()
 {
     this.names = new SimpleSortedList <string>();
     Assert.That(this.names.Capacity, Is.EqualTo(RequiredCapacity));
     Assert.That(this.names.Size, Is.EqualTo(RequiredInitialSize));
 }
Пример #10
0
 public void TestCtorWithAllParameters()
 {
     this.names = new SimpleSortedList <string>(StringComparer.OrdinalIgnoreCase, 30);
     Assert.That(this.names.Capacity, Is.EqualTo(30));
     Assert.That(this.names.Size, Is.EqualTo(0));
 }
Пример #11
0
 public void TestAdd_IncreasesSize()
 {
     this.names = new SimpleSortedList <string>();
     names.Add("Pesho");
     Assert.That(this.names.Size, Is.EqualTo(1));
 }
Пример #12
0
 public void TestEmptyCtor()
 {
     this.names = new SimpleSortedList <string>();
     Assert.That(this.names.Capacity, Is.EqualTo(16));
     Assert.That(this.names.Size, Is.EqualTo(0));
 }
Пример #13
0
 public void TestConstructorWithInitialCapacity()
 {
     this.names = new SimpleSortedList <string>(30);
     Assert.That(this.names.Capacity, Is.EqualTo(30));
     Assert.That(this.names.Size, Is.EqualTo(0));
 }
 public void SetUp()
 {
     this.sut = new SimpleSortedList <string>();
 }
Пример #15
0
 public void SetUp()
 {
     this.names            = new SimpleSortedList <string>();
     this.expectedCapacity = 16; //the default capacity of the collection
     this.expectedSize     = 0;  // the default size of the collection
 }
Пример #16
0
 public void TestCtorWithInitialCapacity()
 {
     this.names = new SimpleSortedList <string>(20);
     Assert.That(this.names.Capacity, Is.EqualTo(20));
     Assert.That(this.names.Size, Is.EqualTo(RequiredInitialSize));
 }
 public void TestEmptyCtor()
 {
     this.names = new SimpleSortedList<string>();
     Assert.AreEqual(16, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
Пример #18
0
 public void TestCtorWithInitialComparer()
 {
     this.names = new SimpleSortedList <string>(StringComparer.OrdinalIgnoreCase);
     Assert.That(this.names.Capacity, Is.EqualTo(RequiredCapacity));
     Assert.That(this.names.Size, Is.EqualTo(RequiredInitialSize));
 }
 public void TestCtorWithAllParams()
 {
     this.names = new SimpleSortedList<string>(StringComparer.OrdinalIgnoreCase, 20);
     Assert.AreEqual(20, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
 public void InitializeTestDependencies()
 {
     this.names = new SimpleSortedList <string>();
 }
 public void TestInitialize()
 {
     this.names = new SimpleSortedList <string>();
 }
 public void TestEmptyConstructor()
 {
     this.names = new SimpleSortedList <string>();
     Assert.AreEqual(16, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
Пример #23
0
 public void TestJoinWithNull()
 {
     this.names = new SimpleSortedList <string>();
     this.names.AddAll(new string[] { "ivan", "nasko" });
     Assert.Throws <ArgumentNullException>(() => names.JoinWith(null));
 }
 public void TestConstructorWithInitialCapacity()
 {
     this.names = new SimpleSortedList <string>(20);
     Assert.AreEqual(20, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
Пример #25
0
 public void TestAddingAllFromCollectionIncreasesSize()
 {
     this.names = new SimpleSortedList <string>();
     names.AddAll(new[] { "Georgi", "Rosen" });
     Assert.That(names.Size, Is.EqualTo(2));
 }
 public void TestConstructorWithAllParameters()
 {
     this.names = new SimpleSortedList <string>(30, StringComparer.OrdinalIgnoreCase);
     Assert.AreEqual(30, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
Пример #27
0
 public void TestCtorWithInitialComparer()
 {
     this.names = new SimpleSortedList <string>(StringComparer.OrdinalIgnoreCase);
     Assert.AreEqual(this.names.Capacity, 16);
     Assert.AreEqual(this.names.Size, 0);
 }
 public void TestCtorWithInitialCapacity()
 {
     this.names = new SimpleSortedList<string>(20);
     Assert.AreEqual(20, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
 public void TestEmptyCtor()
 {
     this.names = new SimpleSortedList <string>();
     Assert.AreEqual(this.names.Capacity, 16);
     Assert.AreEqual(this.names.Size, 0);
 }
 public void TestCtorWithInitialCompararer()
 {
     this.names = new SimpleSortedList<string>(StringComparer.OrdinalIgnoreCase);
     Assert.AreEqual(16, this.names.Capacity);
     Assert.AreEqual(0, this.names.Size);
 }
 public void TestCtorWithAllParams()
 {
     this.names = new SimpleSortedList <string>(StringComparer.OrdinalIgnoreCase, 30);
     Assert.AreEqual(this.names.Capacity, 30);
     Assert.AreEqual(this.names.Size, 0);
 }
Пример #32
0
 public void SetUp()
 {
     this.names = new SimpleSortedList <string>(StringComparer.OrdinalIgnoreCase);
 }