public void DeSerializeElectionParameterTest() { var electionParameterList = ElectionParameterList.FromXml <ElectionParameterList>( this.GetElectionParametersText()); Assert.AreEqual(6, electionParameterList.Count); Assert.AreEqual("ElectionName", electionParameterList[0].Name); Assert.AreEqual("Philippines Demo", electionParameterList[0].Value); }
public void SerializeElectionParameterTest() { var electionParamList = ElectionParameterList.FromXml <ElectionParameterList>( this.GetElectionParametersText()); var xmlRootOverride = new XmlRootAttribute("ElectionParameters"); string electionParamXml = ElectionParameterList.Serialize( electionParamList, xmlRootOverride); Assert.AreEqual( this.GetElectionParametersText(), electionParamXml, electionParamXml); }