Exemplo n.º 1
0
        public void PresentMultipleElectionResultWithSameParticipation()
        {
            var t_Presenter     = new MultipleElectionResultPresenter();
            var t_PresentedText = t_Presenter.Present(
                new List <ElectionResult>
            {
                new ElectionResult
                {
                    Participation = new Participation {
                        Value = new Percentage {
                            Value = 0.33m
                        }
                    },
                    Region = new Region {
                        Code = -1, Name = "Foobar"
                    }
                },
                new ElectionResult
                {
                    Participation = new Participation {
                        Value = new Percentage {
                            Value = 0.33m
                        }
                    },
                    Region = new Region {
                        Code = -1, Name = "Bar"
                    }
                }
            });

            Assert.AreEqual("Foobar, Bar: 33.0%", t_PresentedText);
        }
Exemplo n.º 2
0
        public void PresentEmptyElectionResult()
        {
            var t_Presenter     = new MultipleElectionResultPresenter();
            var t_PresentedText = t_Presenter.Present(new List <ElectionResult>());

            Assert.AreEqual("No values found!", t_PresentedText);
        }