示例#1
0
        public void Next_ShouldReturn_NextEmployee()
        {
            collection.AddEmployee(new Elempoyee("Lavanya", 100));
            collection.AddEmployee(new Elempoyee("Tereena", 101));
            Iterator  iterator = collection.CreateIterator();
            Elempoyee emp      = iterator.Next();

            Assert.Equal("Tereena", emp.Name);
        }
示例#2
0
        public void First_ShouldReturn_FirstEmployee()
        {
            Elempoyee emp = new Elempoyee("Lavanya", 100);

            collection.AddEmployee(emp);
            collection.AddEmployee(new Elempoyee("Tereena", 101));

            Iterator  iterator = collection.CreateIterator();
            Elempoyee expected = iterator.First();

            Assert.Equal(emp.Name, expected.Name);
        }