public void AbstractionSerialize_ListOfStrings() { var mock = AbstractionMocks.GetListOfStringsMock(); var result = SerializeJson(mock.TestObject, mock.AbstractType); Assert.IsNotNull(result); Assert.AreEqual(GetNormalizedJson(mock.JsonData), result); }
public void AbstractionDeserialize_ListOfStrings() { var mock = AbstractionMocks.GetListOfStringsMock(); var result = DeserializeJson <ListOfStrings>(mock.JsonData, mock.AbstractType); Assert.IsNotNull(result); Assert.IsInstanceOf <ListOfStrings>(result, "Wrong instance"); Assert.AreEqual("Test", result.Param1); Assert.IsTrue(result.Collection.Count == 2); Assert.AreEqual("opt1", result.Collection[0]); Assert.AreEqual("opt2", result.Collection[1]); }