Exemplo n.º 1
0
 public void LeadingCandidateHandlesBadInput2()
 {
     try
     {
         var lc    = new LeadingCandidate.LeadingCandidate();
         var votes = new List <Tuple <char, DateTime> >();
         lc.GetLeadingCandidateAtTime(votes, new DateTime(2019, 03, 20));
     } catch (ArgumentException) { }
 }
Exemplo n.º 2
0
        public void LeadingCandidateFindsLeader()
        {
            var lc    = new LeadingCandidate.LeadingCandidate();
            var votes = new List <Tuple <char, DateTime> > {
                Tuple.Create('a', new DateTime(2019, 03, 19))
            };

            lc.GetLeadingCandidateAtTime(votes, new DateTime(2019, 03, 20));
        }
Exemplo n.º 3
0
        public void LeadingCandidateHandlesBadInput()
        {
            var lc = new LeadingCandidate.LeadingCandidate();

            try
            {
                lc.GetLeadingCandidateAtTime(null, new DateTime(2019, 03, 20));
                throw new AssertFailedException();
            } catch (ArgumentException) { }
        }