Link to home
Create AccountLog in
Avatar of CipherIS
CipherISFlag for United States of America

asked on

C# Assert.AreEqual

I am trying to test my code but I am getting an error and I shouldn't.  Code is below.

List<string> expected = new List<string>();
expected.Add("hello");

List<string> result = new List<string>();
result.Add("hello");

Assert.AreEqual(expected, result);

Open in new window


I'm receiving the following error:  

Assert.AreEqual failed.
Expected:<System.Collections.Generic.List`1[System.String]>.
Actual:<System.Collections.Generic.List`1[System.String]>.
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of CipherIS

ASKER

thank you