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
True or False: Unity can apply multiple textures to a single object or terrain
MaRussiya [10]
This is very true unity is what u said and it is the definition of this
3 0
2 years ago
What is the output of the code? (CHECK IMAGE)
PIT_PIT [208]

Answer:

689

Explanation:

8 0
2 years ago
Given four files named asiasales2009.txt, europesales2009.txt, africasales2009.txt, latinamericasales2009.txt, define four ofstr
Lynna [10]

Answer:

ofstream asia("asiasales2009.txt");  //It is used to open asiasales2009.txt files with the asia objects.

ofstream europe("europesales2009.txt");  //It is used to open  europesales2009.txt files with the europe objects.

ofstream africa("africasales2009.txt"); //It is used to open africasales2009.txt files with the africa objects.

ofstream latin("latinamericasales2009.txt");//It is used to open latinamericasales2009.txt files with the latin objects.

Explanation:

  • The above code is written in the c++ language which is used to open the specified files with the specified objects by the help of ofstream class as described in the question-statements.
  • The ofstream is used to open the file in the c++ programing language, so when a user wants to use the ofstream to open the file in written mode, then he needs to follow the below syntax--

              ofstream object("file_name_with_extension");

4 0
3 years ago
How chip memory is divided based upon retention, power and manufacturing
Kisachek [45]

Answer:

Some computer science stuff I guess

6 0
3 years ago
Will you benefit from understanding management principles even if you decide not to go into management
satela [25.4K]

Answer:

Yes

Explanation:

It says it.

5 0
3 years ago
Other questions:
  • _____ is an information-analysis tool that involves the automated discovery of patterns and relationships in a data warehouse.
    12·1 answer
  • Give reasons why mind-mapping software is important to project development.
    14·1 answer
  • What standard linux utility is used to install and configure software on centos operating systems?
    8·1 answer
  • In general terms, a program that is broken into smaller units of code such as methods, is known as a ________
    6·1 answer
  • A cyber community is different than a physical community because _________________. A.people can go to restaurants to meet frien
    13·1 answer
  • Brainstorming the pros and cons of upgrading versus replacing a set of ten desktop computers _________
    6·1 answer
  • Your boss is very skeptical about the idea of storing his files up in the cloud rather than on a local storage drive. He asks yo
    7·1 answer
  • Which skill type refers to the knowledge and ability to perform a task?
    13·2 answers
  • This is gonna be very long but I have no idea what to do, I'm confused.
    6·1 answer
  • How do we prevent electrical problems as prescribe by the course?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!