protected void SetupJsonSerializerDeserialize <T>(string response = null, T result = null) where T : class, new() { if (response == null) { response = It.IsAny <string>(); } if (result == null) { result = new T(); } MockJsonSerializer .Setup(x => x.Deserialize <T>(response)) .Returns(result); }
protected void SetupJsonSerializerSerialize(string result = RequestJson) { MockJsonSerializer .Setup(x => x.Serialize(It.IsAny <object>())) .Returns(result); }