public void TestGQLVariableGetVariableName(string test_name, string test_expected) { GQLVariable variable = new GQLVariable { VariableField = new GQLField { Field = new KeyValuePair <string, object>(test_name, "Value") }, DataType = "Int" }; Assert.AreEqual(test_expected, variable.GetParameterName()); }
public void TestGQLVariableToGQLString( string test_name, object test_val, string test_type ) { string expected = $"{test_name}:{test_val}"; GQLVariable variable = new GQLVariable { VariableField = new GQLField { Field = new KeyValuePair <string, object>(test_name, test_val) }, DataType = test_type }; Assert.AreEqual(expected, variable.ToGQLString()); }
public void TestGQLVariableToParameterString( string test_name, object test_val, string test_type ) { GQLVariable variable = new GQLVariable { VariableField = new GQLField { Field = new KeyValuePair <string, object>(test_name, test_val) }, DataType = test_type }; string expected = $"{variable.GetParameterName()}:{test_type}!"; Assert.AreEqual(expected, variable.ToParameterString()); }