Exemplo n.º 1
0
        public void Clear()
        {
            WordInfoCollection collection = new WordInfoCollection();

            WordInfo mi1 = new WordInfo("continuous", 0, 0, WordLocation.Content);
            WordInfo mi2 = new WordInfo("taskbar", 21, 1, WordLocation.Content);

            collection.Add(mi1);
            collection.Add(mi2);
            Assert.AreEqual(2, collection.Count, "Wrong count (collection should contain 2 items)");

            collection.Clear();
            Assert.AreEqual(0, collection.Count, "Wrong count (collection should be empty)");
        }
Exemplo n.º 2
0
        public void Clear()
        {
            WordInfoCollection collection = new WordInfoCollection();

            WordInfo mi1 = new WordInfo("continuous", 0, 0, WordLocation.Content);
            WordInfo mi2 = new WordInfo("taskbar", 21, 1, WordLocation.Content);

            collection.Add(mi1);
            collection.Add(mi2);
            Assert.AreEqual(2, collection.Count, "Wrong count (collection should contain 2 items)");

            collection.Clear();
            Assert.AreEqual(0, collection.Count, "Wrong count (collection should be empty)");
        }
Exemplo n.º 3
0
        public void Clear()
        {
            WordInfoCollection sut = new WordInfoCollection();

            WordInfo mi1 = new WordInfo("continuous", 0, 0, WordLocation.Content);
            WordInfo mi2 = new WordInfo("taskbar", 21, 1, WordLocation.Content);

            sut.Add(mi1);
            sut.Add(mi2);
            Assert.Equal(2, sut.Count);

            sut.Clear();
            Assert.Empty(sut);
        }