public void AbstractionSerialize_IListOfInterfaces() { var mock = AbstractionMocks.GetIListOfInterfacesMock(); var result = SerializeJson(mock.TestObject, mock.AbstractType); Assert.IsNotNull(result); Assert.AreEqual(GetNormalizedJson(mock.JsonData), result); }
public void AbstractionDeserialize_IListOfInterfaces() { var mock = AbstractionMocks.GetIListOfInterfacesMock(); var result = DeserializeJson <IListOfInterfaces>(mock.JsonData, mock.AbstractType); Assert.IsNotNull(result); Assert.IsInstanceOf <IListOfInterfaces>(result, "Wrong instance"); Assert.AreEqual("Test", result.Param1); Assert.IsTrue(result.Collection.Count == 2); Assert.IsInstanceOf <IList <INested> >(result.Collection, "Wrong instance"); Assert.AreEqual(3, result.Collection[0].Param1); Assert.AreEqual(4, result.Collection[1].Param1); }