Partilhar via


Construtor CssProjectStructureAttribute

Inicializa uma nova instância da classe CssProjectStructureAttribute.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (em Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Sintaxe

'Declaração
Public Sub New ( _
    cssProjectStructure As String _
)
public CssProjectStructureAttribute(
    string cssProjectStructure
)
public:
CssProjectStructureAttribute(
    String^ cssProjectStructure
)
new : 
        cssProjectStructure:string -> CssProjectStructureAttribute
public function CssProjectStructureAttribute(
    cssProjectStructure : String
)

Parâmetros

  • cssProjectStructure
    Tipo: System.String
    Uma seqüência de caracteres que identifica o recurso de projeto correspondente.

Exemplos

A exemplo a seguir mostra um CssProjectStructureAttribute inicializado e aplicado a um método de teste.

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace SampleTestProject
{
   [TestClass]
   public class UnitTest1
   {
      [TestMethod]
      [CssIteration("vstfs:///Classification/Node/3ab4f649")]
      [CssProjectStructure("vstfs:///Classification/Node/a8a26a10")]
      public void TestMethod1()
      {
         // TODO: Add test logic here
      }
   }
}
Imports System
Imports Microsoft.VisualStudio.TestTools.UnitTesting

Namespace SampleTestProject
    <TestClass()> _
    Public Class UnitTest1
        <TestMethod()> _
        <CssIteration("vstfs:///Classification/Node/3ab4f649")> _
        <CssProjectStructure("vstfs:///Classification/Node/a8a26a10")> _
        Public Sub TestMethod1()
            ' TODO: Add test logic here
        End Sub
    End Class
End Namespace

Segurança do .NET Framework

Consulte também

Referência

CssProjectStructureAttribute Classe

Namespace Microsoft.VisualStudio.TestTools.UnitTesting