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); }
public ReturnResult <bool> HasVotedForModel(int modelId) { return(ModelVote.HasVotedForModel(Db, Int32.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)), modelId)); }