1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fgiga [73]
3 years ago
7

When writing test methods, what functionality is verified by the system method "runAs()"?

Computers and Technology
1 answer:
olchik [2.2K]3 years ago
4 0

Answer:

The main functionality verified by this test method command is user sharing record.

Explanation:

Generally, every apex code runs in system mode.

Apex is strong object-oriented programming language that allows the developers to execute flow and transaction control.

Using syntax which look like java and acts as databases, Apex allows the developer to add any type of business logics to an event which can include button, clicks records or visual pages.

Apex code can be initiated by web service request.  

The permissions and record sharing of current user are not consider by apex codes.

Now the system method runAs() will allow you to take or write a test method which will basically change the user context to an existing or an new user, so that the record sharing will take place.

runAs() command will not change or anything done with user permissions or permission levels, it will only record sharing of the user.  

When you use runAs() command the original and true context will run after the test method is once completed under the command of runAs().

The runAs() has no concern with the user license.  

If there is no or expired your personal or organization license you can just make a new user with this runAS() command.

In using this command we have to make a private class by the name of this test and then our further code to make a user , afterwards  which we will the true and original code of ours which we want to run.

There are many other uses of runAs() like  

 Mixed DML operations in test by opening the DML operations.

 We can also use it as a version which will take a package as a version argument. This will cause the code a specific version.

runAs(System.Version) is the command used for this.

You might be interested in
When should you use the Reply All function when replying to an email
Dmitrij [34]
When the email was sent as a group email 

5 0
3 years ago
Read 2 more answers
Why doesn't the ad load ?
baherus [9]
Try refreshing the page, if not restart your device check your internet etc.
3 0
2 years ago
Read 2 more answers
What types of storage can be used to access data from another computer
Aleksandr-060686 [28]
<span>Hard disk drives
</span><span>RAM<span>Random access memory (RAM)
</span></span><span>External hard disks
<span>USB port
</span></span>CD and DVD drives
<span>Memory cards</span>
6 0
3 years ago
Read 2 more answers
IN MICROSOFT EXCEL YOU CAN UES FOMULA TO DIVIDE OR MULTIPLY WHAT IS THE CORRECT FORMULA TO CALCULATE 4*6
nexus9112 [7]

You actually have the correct answer. An excel formula starts with = so your answer would be =4*6

8 0
3 years ago
The primary reason for the creation of the Federal Reserve System LOADING... ​was: A. to create a single central bank similar to
Gelneren [198K]

Answer: (C) to reduce or eliminate future bank panics.

Explanation:

The Federal Reserve System being the central reserve system in the US was created with the primary objective of reducing and eliminating bank panics in periods of recessions and depressions and other bank related matters.

3 0
3 years ago
Other questions:
  • Mike wants to build an amplifier. Which technology can he use?
    15·1 answer
  • Which is NOT a way the network operating sys-
    6·1 answer
  • To add and remove chart elements, you can use the add chart element button in the charts layout group on the ____ tab.
    6·1 answer
  • The technology (software) that automatically downloads website information to your computer is called ________.'
    15·1 answer
  • Which term describes the process by which light passes through an object or a medium.
    7·2 answers
  • ………………….. is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of
    9·1 answer
  • Can you answer my question it's a bit confusing to me! I'm adding brainlist too!
    8·1 answer
  • Complete the function void update (int *a, int *b), which reads two integers as argument, and sets a with the sum of them, and b
    8·1 answer
  • The visitor's age is stored in the variable age, the day of the week is stored in a variable day, and the price in dollars is st
    8·1 answer
  • Describe all the steps a router goes through while deciding where to send the a packet. Explain why a router would choose one ro
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!