Avatar of CipherIS
CipherIS
Flag 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]>.
C#.NET Programming

Avatar of undefined
Last Comment
CipherIS

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Miguel Oz

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
CipherIS

ASKER
thank you
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy