private void GenerateJsonFileFor(DummyDataHolder data, string key) { var json = GetJsonOf(data); var path = GetDummyDataPath(key); EnsurePathExists(path); File.WriteAllText(path, json); }
private string GetJsonOf(DummyDataHolder data) => $"{{\"Text\":\"{data.Text}\",\"Number\":{data.Number}}}";