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); }
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); }