public void ToGuidArray2() { List <int> input = new[] { 0, 1024, int.MaxValue }.ToList(); Guid[] result1 = GuidUtils.ToGuidArray(input); Guid[] result2 = input.ToGuidArray(); Assert.AreEqual(3, result1.Length); Assert.AreEqual(3, result2.Length); Assert.AreEqual("00000000-0000-0000-0000-000000000000", result1[0].ToString()); Assert.AreEqual("00000000-0000-0000-0000-000000000000", result2[0].ToString()); Assert.AreEqual("00000400-0000-0000-0000-000000000000", result1[1].ToString()); Assert.AreEqual("00000400-0000-0000-0000-000000000000", result2[1].ToString()); Assert.AreEqual("7fffffff-0000-0000-0000-000000000000", result1[2].ToString()); Assert.AreEqual("7fffffff-0000-0000-0000-000000000000", result2[2].ToString()); }
public void ToGuidArray1() { int[] input = { 0, 1024, int.MaxValue }; Guid[] result1 = GuidUtils.ToGuidArray(input); Guid[] result2 = input.ToGuidArray(); Assert.AreEqual(3, result1.Length); Assert.AreEqual(3, result2.Length); Assert.AreEqual("00000000-0000-0000-0000-000000000000", result1[0].ToString()); Assert.AreEqual("00000000-0000-0000-0000-000000000000", result2[0].ToString()); Assert.AreEqual("00000400-0000-0000-0000-000000000000", result1[1].ToString()); Assert.AreEqual("00000400-0000-0000-0000-000000000000", result2[1].ToString()); Assert.AreEqual("7fffffff-0000-0000-0000-000000000000", result1[2].ToString()); Assert.AreEqual("7fffffff-0000-0000-0000-000000000000", result2[2].ToString()); }