LinqExtensionsTest ToCSVStringTest

Mar 20, 2013 at 8:38 PM
Edited Mar 20, 2013 at 8:38 PM
I'm trying to write a test for the ToCSVStringTest extension in LinqExtensions code but not getting the expected results. Can someone kindly help?

Here is the test I'm trying to write:
        /// <summary>
        ///A test for ToCSVString
        ///</summary>
        [TestMethod()]
        public void ToCSVStringTest()
        {
            int[] x = { 4, 2, 1, 3 };
            IOrderedQueryable data = x.AsQueryable().OrderBy(a => a);
            string expected = "1,2,3,4";
            string actual;
            actual = LinqExtensions.ToCSVString(data);
            Assert.AreEqual(expected, actual);
        }