mercredi 12 avril 2017

Tool to Generate Mock XML With Filled in Values From C# Class

Sometimes when working with legacy code I get gigantic objects I need to mock to pass through applications...objects with like 200 property's

Instead of building out the object manually is there a way I can generate a mock xml object from a C# class with the values filled in? For example:

public Class Animal
{
    public bool hasWings {get; set;}
    public string name {get; set;}
    public int numberOfFeet {get; set;}
}

would turn into:

<Animal>
  <hasWings>true</hasWings>
  <name>string</name>
  <numberOfFeet>0</numberOfFeet>
</Animal>

I don't need actual real values...just placeholders

Thanks!

Aucun commentaire:

Enregistrer un commentaire