import * as assert from 'assert' ; import { SyntacticAnalysisCSharp } from '../../src/SyntacticAnalysis/SyntacticAnalysisCSharp' ; import { CommentSyntax } from '../../src/Entity/Config/Contributes/Configuration' ; suite ( 'SyntacticAnalysis.SyntacticAnalysisCSharp.IsNamespace Tests' , ( ) => { test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsNamespace
        STATE   : -
        IN      : null
        OUT     : false
    ` , ( ) => { const code = null ; const actual = SyntacticAnalysisCSharp . IsNamespace ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsNamespace
        STATE   : -
        IN      : ''
        OUT     : false
    ` , ( ) => { const code = '' ; const actual = SyntacticAnalysisCSharp . IsNamespace ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsNamespace
        STATE   : -
        IN      : 'namespacefoo'
        OUT     : false
    ` , ( ) => { const code = 'namespacefoo' ; const actual = SyntacticAnalysisCSharp . IsNamespace ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsNamespace
        STATE   : -
        IN      : 'namespace'
        OUT     : true
    ` , ( ) => { const code = 'namespace' ; const actual = SyntacticAnalysisCSharp . IsNamespace ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsNamespace
        STATE   : -
        IN      : ' namespace '
        OUT     : true
    ` , ( ) => { const code = ' namespace ' ; const actual = SyntacticAnalysisCSharp . IsNamespace ( code ) ; assert . equal ( actual , true ) ; } ) ; } ) ; suite ( 'SyntacticAnalysis.SyntacticAnalysisCSharp.IsClass Tests' , ( ) => { test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsClass
        STATE   : -
        IN      : null
        OUT     : false
    ` , ( ) => { const code = null ; const actual = SyntacticAnalysisCSharp . IsClass ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsClass
        STATE   : -
        IN      : ''
        OUT     : false
    ` , ( ) => { const code = '' ; const actual = SyntacticAnalysisCSharp . IsClass ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsClass
        STATE   : -
        IN      : 'namespacefoo'
        OUT     : false
    ` , ( ) => { const code = 'namespacefoo' ; const actual = SyntacticAnalysisCSharp . IsClass ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsClass
        STATE   : -
        IN      : 'class'
        OUT     : true
    ` , ( ) => { const code = 'class' ; const actual = SyntacticAnalysisCSharp . IsClass ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsNamespace
        STATE   : -
        IN      : ' class '
        OUT     : true
    ` , ( ) => { const code = ' class ' ; const actual = SyntacticAnalysisCSharp . IsClass ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : GetMethodParamNameList
        STATE   : -
        IN      : ' public void Save(string data, Action<AchievementSavedResponse> onComplete = null) {'
        OUT     : [0]='data', [1]='onComplete'
    ` , ( ) => { const code = ' public void Save(string data, Action<AchievementSavedResponse> onComplete = null) {' ; const actual = SyntacticAnalysisCSharp . GetMethodParamNameList ( code ) ; assert . equal ( actual [ 0 ] , 'data' ) ; assert . equal ( actual [ 1 ] , 'onComplete' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : SyntacticAnalysis.SyntacticAnalysisCSharp
        Method  : IsDocComment
    ` , ( ) => { assert . equal ( SyntacticAnalysisCSharp . IsDocComment ( '///' , CommentSyntax . single ) , true , '///' ) ; assert . equal ( SyntacticAnalysisCSharp . IsDocComment ( ' ///' , CommentSyntax . single ) , true , ' ///' ) ; assert . equal ( SyntacticAnalysisCSharp . IsDocComment ( ' /// ' , CommentSyntax . single ) , true , ' /// ' ) ; } ) ; } ) ;