2008-08-26 4 views

Répondre

1

En voici une pour une classe test avec le support de Nunit.


    Imports Nunit.FrameWork 

    Namespace $NAMESPACE$ 
    ''' 
    ''' A TestClass 
    ''' 
    ''' 
    _ 
    Public Class $CLASSNAME$ 

#Region " Setup and TearDown " 
     ''' 
     ''' Sets up the Tests 
     ''' 
     ''' 
     _ 
     Public Sub Setup() 

      End Sub 

     ''' 
     ''' Tears down the test. Is executed after the Test is Completed 
     ''' 
     ''' 
     _ 
     Public Sub TearDown() 

     End Sub  
#End Region 

#Region " Tests " 
       ''' 
     ''' A Test 
     ''' 
     ''' 
      _ 
      Public Sub $Test_Name$() 

      End Sub 
#End Region 

    End Class 
End Namespace
0

MSTest testclass. J'aime mon testclass basic. Pas comme celui qui est créé par VS.

Imports Microsoft.VisualStudio.TestTools.UnitTesting 

<TestClass()> _ 
Public Class $ClassName$ 
    $END$ 
End Class 

$Classname est "Nom du fichier courant sans extension" macro.

Questions connexes