예제 #1
0
        public void HasVotedForModelTestNo()
        {
            MockDb.Setup(x => x.Single <int>(It.IsAny <string>(), It.IsAny <object[]>())).Returns(0);
            var results = ModelVote.HasVotedForModel(MockDb.Object, 1, 1);

            Assert.IsFalse(results.Item);
        }
예제 #2
0
 public ReturnResult <bool> HasVotedForModel(int modelId)
 {
     return(ModelVote.HasVotedForModel(Db, Int32.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)), modelId));
 }