Skip to content

Commit 8fa78d1

Browse files
committed
test: refac sending of json_response to test server
1 parent 7628b1c commit 8fa78d1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Assets/Test/Scripts/CommandExecutor.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,13 @@ private void Config()
376376
{
377377
updatedJsonResponse["cost_amount"] = string.Format("{0:0.00}", System.Convert.ToDouble(costAmount));
378378
}
379-
#endif
380379
_testLibrary.AddInfoToSend("json_response", JsonConvert.SerializeObject(updatedJsonResponse));
380+
#else
381+
if (attribution.JsonResponse != null)
382+
{
383+
_testLibrary.AddInfoToSend("json_response", attribution.GetJsonResponseAsString());
384+
}
385+
#endif
381386
_testLibrary.SendInfoToServer(localExtraPath);
382387
});
383388
}
@@ -976,8 +981,13 @@ private void AttributionGetter()
976981
{
977982
updatedJsonResponse["cost_amount"] = string.Format("{0:0.00}", System.Convert.ToDouble(costAmount));
978983
}
979-
#endif
980984
_testLibrary.AddInfoToSend("json_response", JsonConvert.SerializeObject(updatedJsonResponse));
985+
#else
986+
if (attribution.JsonResponse != null)
987+
{
988+
_testLibrary.AddInfoToSend("json_response", attribution.GetJsonResponseAsString());
989+
}
990+
#endif
981991
_testLibrary.SendInfoToServer(localExtraPath);
982992
});
983993
}

0 commit comments

Comments
 (0)