Hi
I want to test my function which takes a parameterXLangMessage.
the function returns th econtext 'ABC' of a message.
Here is the code of my function that i want to test
public static String TransfererContexteFichier(XLANGMessage Xmsg_Fichier)
{
String str_ContexteABC = null;
try
{
XDocument xDoc;
Stream originalStream = (Stream)Xmsg_Fichier[0].RetrieveAs(typeof(Stream));
using (XmlReader reader = XmlReader.Create(originalStream))
{
reader.MoveToContent();
xDoc = XDocument.Load(reader);
}
XElement ElementABC = xDoc.Element("ContexteABC");
str_ContexteABC= ElementABC.ToString();
}
catch (Exception)
{
throw;
}
return str_ContexteABC;
}
thank you