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
kamila
NA
10
0
Writing test case for static method with linq in moq
Apr 26 2018 4:50 AM
Hi , Am new to mock test, am trying to write a test case for the follwing method could shed some light of checking the collection in a simple through mock .And this is static method.
ACollection obj = (ACollection)aCollection.Filter();
var result = aCollection.Where(a => a.IsConditionEvaluatedAndTrue())
.Select(arg =>
new
KeyValuePair<
int
, WebArg>(arg.Key,
new
WebArg(arg) { IsConditionTrue =
true
}))
.OrderByDescending(pair =>
WebArg.MapAllSupportLevelsToNumeric(pair.Value.VerboseArgumentLevel))
.ToDictionary(pair => pair.Key, pair => pair.Value);
return
result;
Reply
Answers (
1
)
Formatting is missing while answering
bara code printing