71 строка
2.9 KiB
Markdown
71 строка
2.9 KiB
Markdown
---
|
|
title: SetupStatic Method (Type, Behavior, StaticConstructor)
|
|
page_title: SetupStatic Method (Type, Behavior, StaticConstructor) | JustMock Documentation
|
|
description: Documentation page about SetupStatic Method (Type, Behavior, StaticConstructor).
|
|
previous_url: /m_telerik_justmock_mock_setupstatic_2.html
|
|
slug: m_telerik_justmock_mock_setupstatic_2
|
|
published: True
|
|
fullPath: api/n_telerik_justmock/t_telerik_justmock_mock/methods_t_telerik_justmock_mock/overload_telerik_justmock_mock_setupstatic/m_telerik_justmock_mock_setupstatic_2
|
|
category: "api"
|
|
---
|
|
|
|
# Mock.SetupStatic Method (Type, Behavior, StaticConstructor)
|
|
|
|
|
|
|
|
Setups the target for mocking all static calls.
|
|
|
|
|
|
**Namespace:** [Telerik.JustMock](n_telerik_justmock) <br> **Assembly:** Telerik.JustMock(in Telerik.JustMock.dll)
|
|
## Syntax
|
|
|
|
|
|
<div id="syntaxCodeBlocks" class="code"><span codeLanguage="CSharp"><table><tr><th>C#</th></tr><tr><td><pre xml:space="preserve"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">SetupStatic</span>(
|
|
<a href="https://msdn2.microsoft.com/en-us/library/42892f65" target="_blank">Type</a> <span class="parameter">targetType</span>,
|
|
<a href="T_Telerik_JustMock_Behavior.html">Behavior</a> <span class="parameter">behavior</span>,
|
|
<a href="T_Telerik_JustMock_StaticConstructor.html">StaticConstructor</a> <span class="parameter">staticConstructor</span>
|
|
)</pre></td></tr></table></span><span codeLanguage="VisualBasicDeclaration"><table><tr><th>Visual Basic</th></tr><tr><td><pre xml:space="preserve"><span class="keyword">Public</span> <span class="keyword">Shared</span> <span class="keyword">Sub</span> <span class="identifier">SetupStatic</span> ( _
|
|
<span class="parameter">targetType</span> <span class="keyword">As</span> <a href="https://msdn2.microsoft.com/en-us/library/42892f65" target="_blank">Type</a>, _
|
|
<span class="parameter">behavior</span> <span class="keyword">As</span> <a href="T_Telerik_JustMock_Behavior.html">Behavior</a>, _
|
|
<span class="parameter">staticConstructor</span> <span class="keyword">As</span> <a href="T_Telerik_JustMock_StaticConstructor.html">StaticConstructor</a> _
|
|
)</pre></td></tr></table></span></div>
|
|
|
|
|
|
|
|
targetType<br>
|
|
|
|
|
|
Type: [System.Type](42892f65) <br>Target type
|
|
|
|
|
|
|
|
behavior<br>
|
|
|
|
|
|
Type: [Telerik.JustMock.Behavior](t_telerik_justmock_behavior) <br>Specifies behavior of the mock. Default is [RecursiveLoose](t_telerik_justmock_behavior)
|
|
|
|
|
|
|
|
staticConstructor<br>
|
|
|
|
|
|
Type: [Telerik.JustMock.StaticConstructor](t_telerik_justmock_staticconstructor) <br>Defines the behavior of the static constructor
|
|
|
|
|
|
|
|
|
|
## See Also
|
|
|
|
|
|
|
|
[Mock Class](t_telerik_justmock_mock)
|
|
|
|
[Mock Members](allmembers_t_telerik_justmock_mock)
|
|
|
|
[SetupStatic Overload](overload_telerik_justmock_mock_setupstatic)
|
|
|
|
[Telerik.JustMock Namespace](n_telerik_justmock)
|
|
|
|
|
|
|