
Moq (514-06)
Authored by Nataly Revutska
Computers
1st Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is mock?
This is a fake object in the system that decides whether or not a unit test has passed or failed.
This is a controllable replacement for an existing dependency (or collaborator) in the system. By using this, you can test your code without dealing with the dependency directly.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Does Moq framework support out/ref arguments?
yes
no
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Choose all methods of Mock class
As
Behavior
Get
Verify
OnGetObject
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Choose structure of Moq namespace
MockFactory
SequenceExtensions
Times
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can Mock's Setup method be used with all return types of a function?
Yes
No
6.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which ways to set up async methods are valid?
mock.Setup(foo => foo.DoSomethingAsync().Result).Returns(true);
mock.Setup(foo => foo.DoSomethingAsync()).ReturnsAsync(true);
mock.Setup(foo => foo.DoSomethingAsync()).Returns(async () => true);
mock.Setup(foo => foo.DoSomethingAsync()).Returns(true);
7.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which options to match the generic type argument is valid?
(method: bool method<T>();)
mock.Setup(m => m.method<object>()).Returns(true);
mock.Setup(m => m.method()).Returns(true);
mock.Setup(m => m.method<It.IsAnyType>()).Returns(true);
mock.Setup<object>(m => m.method()).Returns(true);
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
BÀI 9. TRÌNH BÀY DỮ LIỆU BẰNG BIỂU ĐỒ
Quiz
•
1st - 12th Grade
10 questions
programowanie Python
Quiz
•
1st Grade
10 questions
การใช้เหตุผลแก้ปัญหา
Quiz
•
1st Grade
11 questions
Bài 9 Hiệu ứng chuyển trang
Quiz
•
1st - 5th Grade
12 questions
วิทย์คำนวณเรื่องการใช้อินเทอร์เน็ต
Quiz
•
1st - 5th Grade
10 questions
Quiz 9 (15.09.2021)
Quiz
•
1st - 12th Grade
10 questions
MS Word
Quiz
•
1st - 5th Grade
10 questions
Знайомство з HTML
Quiz
•
1st - 4th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Life Cycle of a Frog
Quiz
•
1st - 2nd Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
100th Day of School 1st/2nd
Quiz
•
1st - 2nd Grade
15 questions
Reading Comprehension
Quiz
•
1st - 5th Grade
10 questions
Identifying Physical and Chemical Changes
Interactive video
•
1st - 5th Grade
10 questions
Exploring the American Revolution
Interactive video
•
1st - 5th Grade