TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pankaj Bhatnagar
NA
14
526
How to write Mock case for Unit Test
Mar 28 2019 7:57 AM
**I want to write the Mock for the unit test code in MVC5 but little bit confuse in writing that code.
Here is the Function definition:**
public List<CommentsCountInfoResult> GetCommentsCountInfo(int notebookId, int notebookEntryId)
{
return _entities.GetCommentsCountInfo(notebookId,notebookEntryId).ToList();
}
Here is the test case:
[Test]
public void GetCommentsCountInfoTest()
{
var result =_service.GetCommentsCountInfo(1, 1);
//listValue.Setup(m => m.GetCommentsCountInfo(1,1));
var expected = result.Count();
Assert.AreEqual(0, expected);
}
Reply
Answers (
0
)
how to slide down panel when clcked on "+" sign
how upload asp.net project into a server