|
|
|
@ -5,6 +5,8 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using GBase.Exceptions; |
|
|
|
using GBase.Exceptions; |
|
|
|
using GBase.Helpers; |
|
|
|
using GBase.Helpers; |
|
|
|
|
|
|
|
using GBase.Interfaces; |
|
|
|
|
|
|
|
using Moq; |
|
|
|
using NUnit.Framework; |
|
|
|
using NUnit.Framework; |
|
|
|
using Test.GBase.TestClasses; |
|
|
|
using Test.GBase.TestClasses; |
|
|
|
|
|
|
|
|
|
|
|
@ -85,7 +87,7 @@ namespace Test.GBase.Helpers |
|
|
|
|
|
|
|
|
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(list, Enumerables.ConvertToGBaseEnumerable<List<string>>(@string)); |
|
|
|
Assert.AreEqual(list, Enumerables.ConvertToGBaseEnumerable<List<string>>(@string, Mock.Of<IGBase>())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
[Test] |
|
|
|
@ -100,7 +102,7 @@ namespace Test.GBase.Helpers |
|
|
|
|
|
|
|
|
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(list, Enumerables.ConvertToGBaseEnumerable<List<int>>(@string)); |
|
|
|
Assert.AreEqual(list, Enumerables.ConvertToGBaseEnumerable<List<int>>(@string, Mock.Of<IGBase>())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
[Test] |
|
|
|
@ -115,7 +117,7 @@ namespace Test.GBase.Helpers |
|
|
|
|
|
|
|
|
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(list, Enumerables.ConvertToGBaseEnumerable<List<UserType>>(@string)); |
|
|
|
Assert.AreEqual(list, Enumerables.ConvertToGBaseEnumerable<List<UserType>>(@string, Mock.Of<IGBase>())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
[Test] |
|
|
|
@ -130,7 +132,7 @@ namespace Test.GBase.Helpers |
|
|
|
|
|
|
|
|
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
string @string = $"{list[0]},{list[1]},{list[2]}"; |
|
|
|
|
|
|
|
|
|
|
|
InterfaceEnumerablePassedException exception = Assert.Throws<InterfaceEnumerablePassedException>(() => Enumerables.ConvertToGBaseEnumerable<List<IUserType>>(@string)); |
|
|
|
InterfaceEnumerablePassedException exception = Assert.Throws<InterfaceEnumerablePassedException>(() => Enumerables.ConvertToGBaseEnumerable<List<IUserType>>(@string, Mock.Of<IGBase>())); |
|
|
|
Assert.AreEqual(typeof(IUserType), exception.InterfaceType); |
|
|
|
Assert.AreEqual(typeof(IUserType), exception.InterfaceType); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|