public void ResolveJsonToString_Method_Resolve_WhenSourceNull_ReturnsNull() { TestHasJsonDataObject input = null; var expectedResultDataValue = JsonSerializationTestObject.ExpectedSerialization(); var objectUnderTest = new ResolveJsonToString <TestHasJsonDataObject, TestHasJsonDataString>(); var result = objectUnderTest.Resolve(input, null, null, null); Assert.AreEqual(null, result); }
public void ResolveJsonToString_Method_Resolve_WhenSourceValid_SerializesSourceArgumentObjectToString() { var input = new TestHasJsonDataObject { Data = new JsonSerializationTestObject() }; var expectedResultDataValue = JsonSerializationTestObject.ExpectedSerialization(); var objectUnderTest = new ResolveJsonToString <TestHasJsonDataObject, TestHasJsonDataString>(); var result = objectUnderTest.Resolve(input, null, null, null); Assert.AreEqual(expectedResultDataValue, result, false); }