I'm fairly new to unit testing. The following code is just for reference. I want to check empId of list one is same as the emp id of list 2 or not.
public class EmpInfo
{
public EmpInfo( string lastName,string firstName, string empId)
{
EAlphabeticLastName = lastName;
EFirstName = firstName;
EmpId = empId;
}
}
[Test]
[Category("Explicit")]
public void testEmp()
{
public List<EmpInfo> List1e = new List<EmpInfo>(){
new EmpInfo("dx","Tex","25")
};
public List<EmpInfo> List2e = new List<EmpInfo>(){
new EmpInfo("dx","Tex","25")
};
Assert.AreEqual(List1e.empId,List2e.empId);
}
What is the correct way to check equality of list items in Nunit (C#) ?