Пример #1
0
 public void UpdatePoll()
 {
     PollControllerTests.TestPollPut((pollFactory, pollModel, poll) =>
     {
         pollFactory.Setup(_ => _.Fetch(pollModel.PollID)).Returns(poll.Object);
     }, (controller, pollModel) =>
     {
         return(controller.Put(pollModel.PollID, pollModel));
     });
 }
Пример #2
0
 public void CreatePoll()
 {
     PollControllerTests.TestPollPut((pollFactory, pollModel, poll) =>
     {
         pollFactory.Setup(_ => _.Create(pollModel.UserID)).Returns(poll.Object);
     }, (controller, pollModel) =>
     {
         return(controller.Put(pollModel));
     });
 }