示例#1
0
        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);
        }
示例#2
0
        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);
        }