public void BillEnsureICanLogSupport() { Vote vote = new Vote(); Bill bill = new Bill(); bill.AddVote(vote); bill.AddVote(vote); Assert.AreEqual(1, bill.PublicPosition.Count); }
public void VoteEnsureICanLogSupport() { //Arrange Vote vote = new Vote(); //Act vote.LogPublicSupport(true); //Assert Assert.AreEqual("For", vote.support); }
public void AddVote(Vote vote) { if (PublicPosition == null) { PublicPosition = new List<Vote>(); PublicPosition.Add(vote); } else { if (PublicPosition.Exists(v => v.VoteId == vote.VoteId)) { return; } PublicPosition.Add(vote); } }
public void RepoEnsureICanAddVoteByVote() { ConnectMocks(); Vote vote = new Vote(); vote.District = "fl23"; vote.video_id = "itiiweoriw434513"; Repo.AddVote(vote); Assert.AreEqual(1, vote_datasource.Count); Assert.AreEqual("fl23", vote_datasource[0].District); }
public void AddVote(Vote vote) { context.Votes.Add(vote); S(); }
private Vote SetVote(string dis, string vid, bool _bool, int import = 5) { dis = san(dis); Vote vote = new Vote(); vote.District = dis; vote.video_id = vid; vote.LogPublicSupport(_bool); vote.importance = import; context.Votes.Add(vote); return vote; }
public void AddVote(Vote vote) { if(PublicPosition == null) { PublicPosition = new List<Vote>(); } PublicPosition.Add(vote); }
public void VoteEnsureICanCreateAnInstance() { Vote vote = new Vote(); Assert.IsNotNull(vote); }