CredentialAttribute Constructor (String, String)
Initializes a new instance of the CredentialAttribute class with a user name and password needed to access the test Web site.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting.Web
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Sub New ( _
userName As String, _
password As String _
)
'Usage
Dim userName As String
Dim password As String
Dim instance As New CredentialAttribute(userName, _
password)
public CredentialAttribute(
string userName,
string password
)
public:
CredentialAttribute(
String^ userName,
String^ password
)
public function CredentialAttribute(
userName : String,
password : String
)
Parameters
userName
Type: System.StringThe user to authenticate.
password
Type: System.StringThe associated password for the user.
Remarks
Warning
The password is stored in plain text in source code and in the compiled assembly. Restrict access to the source code and assembly to help protect this sensitive information.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TestTools.UnitTesting.Web Namespace