public void GetHttpScriptInvocationContextValueTest_String() { string inputValue = "stringTest"; object result = ScriptInvocationContextExtensions.GetHttpScriptInvocationContextValue(inputValue); Assert.Equal($"\"{inputValue}\"", result); }
public void GetHttpScriptInvocationContextValueTest_POCO() { TestPoco inputValue = new TestPoco() { Name = "TestName", Id = 1234 }; object result = ScriptInvocationContextExtensions.GetHttpScriptInvocationContextValue(inputValue); var resultAsJObject = (JObject)result; Assert.Equal("TestName", resultAsJObject["Name"]); Assert.Equal(1234, resultAsJObject["Id"]); }