Exemplo n.º 1
0
        public void TestProposalsAuthoredByUser()
        {
            proposalRepository.Add(proposal);
            List <Proposal> proposals = proposalRepository.ProposalsAuthoredByUser(user.UserId);

            Assert.AreEqual(proposals.Count, 1);
            proposalRepository.Delete(proposal);
            userRepository.Delete(user);
        }
        public void TestFindAllProposalsExistingInSections()
        {
            proposalRepository.Add(proposal);
            sectionRepository.Add(section);
            int initialValue = sectionRepository.FindAllProposalsExistingInSections().Count;

            Assert.AreEqual(0, initialValue);
            sectionRepository.AddProposalToSection(section, proposal);
            Assert.AreEqual((initialValue + 1), sectionRepository.FindAllProposalsExistingInSections().Count);
            proposalRepository.Delete(proposal);
            sectionRepository.Delete(section);
        }
 public void addProposal(Proposal proposal)
 {
     proposalRepository.Add(proposal);
 }