As unit testing is not used in our firm, I\'m teaching myself to unit test my own code. I\'m using the standard .net test framework for some really basic unit testing.
A
You want the SequenceEqual()
extension method (LINQ):
string[] x = { "abc", "def", "ghi" };
List y = new List() { "abc", "def", "ghi" };
bool isTrue = x.SequenceEqual(y);
or just:
bool isTrue = x.SequenceEqual(new[] {"abc","def","ghi"});
(it will return false if they are different lengths, or any item is different)