CipherIS
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.
I'm receiving the following error:
Assert.AreEqual failed.
Expected:<System.Collectio ns.Generic .List`1[Sy stem.Strin g]>.
Actual:<System.Collections .Generic.L ist`1[Syst em.String] >.
List<string> expected = new List<string>();
expected.Add("hello");
List<string> result = new List<string>();
result.Add("hello");
Assert.AreEqual(expected, result);
I'm receiving the following error:
Assert.AreEqual failed.
Expected:<System.Collectio
Actual:<System.Collections
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER