public void InterfaceSerialize_ArrayOfInterfaces() { var mock = CollectionMocks.GetArrayOfInterfacesMock(); var result = SerializeJson(mock.TestObject, mock.typeToConvert); Assert.IsNotNull(result); Assert.AreEqual(GetNormalizedJson(mock.JsonData), result); }
public void InterfaceDeserialize_ArrayOfInterfaces() { var mock = CollectionMocks.GetArrayOfInterfacesMock(); var result = DeserializeJson <INested2[]>(mock.JsonData, mock.typeToConvert); Assert.IsNotNull(result); Assert.IsTrue(result.Length == 2); Assert.AreEqual("Test", result[0].Param1); Assert.AreEqual("Test2", result[1].Param1); }