public void TestElementWithChildren() { var elem = new Pay(); elem.Prompt( Prompt.ForEnum.PaymentCardNumber, Promoter.ListOfOne(Prompt.ErrorTypeEnum.Timeout), Promoter.ListOfOne(Prompt.CardTypeEnum.Visa), Promoter.ListOfOne(1) ); elem.Parameter("name", "value"); Assert.AreEqual( "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + "<Pay>" + Environment.NewLine + " <Prompt for=\"payment-card-number\" errorType=\"timeout\" cardType=\"visa\" attempt=\"1\"></Prompt>" + Environment.NewLine + " <Parameter name=\"name\" value=\"value\"></Parameter>" + Environment.NewLine + "</Pay>", elem.ToString() ); }