import * as assert from 'assert' ; import { StringUtil } from '../../src/Utility/StringUtil' ; suite ( 'Utility.StringUtil.IsNullOrWhiteSpace Tests' , ( ) => { test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsNullOrWhiteSpace
        STATE   : -
        IN      : null
        OUT     : true
    ` , ( ) => { const code = null ; const actual = StringUtil . IsNullOrWhiteSpace ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsNullOrWhiteSpace
        STATE   : -
        IN      : ''
        OUT     : true
    ` , ( ) => { const code = '' ; const actual = StringUtil . IsNullOrWhiteSpace ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsNullOrWhiteSpace
        STATE   : -
        IN      : ' '
        OUT     : false
    ` , ( ) => { const code = ' ' ; const actual = StringUtil . IsNullOrWhiteSpace ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsNullOrWhiteSpace
        STATE   : -
        IN      : 'foo'
        OUT     : false
    ` , ( ) => { const code = 'foo' ; const actual = StringUtil . IsNullOrWhiteSpace ( code ) ; assert . equal ( actual , false ) ; } ) ; } ) ; suite ( 'Utility.StringUtil.IsCodeBlockStart Tests' , ( ) => { test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsCodeBlockStart
        STATE   : -
        IN      : null
        OUT     : false
    ` , ( ) => { const code = null ; const actual = StringUtil . IsCodeBlockStart ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsCodeBlockStart
        STATE   : -
        IN      : ''
        OUT     : false
    ` , ( ) => { const code = '' ; const actual = StringUtil . IsCodeBlockStart ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsCodeBlockStart
        STATE   : -
        IN      : '{'
        OUT     : true
    ` , ( ) => { const code = '{' ; const actual = StringUtil . IsCodeBlockStart ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsCodeBlockStart
        STATE   : -
        IN      : ';'
        OUT     : true
    ` , ( ) => { const code = ';' ; const actual = StringUtil . IsCodeBlockStart ( code ) ; assert . equal ( actual , true ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsCodeBlockStart
        STATE   : -
        IN      : '[Route("{time}/{location}")]'
        OUT     : false
    ` , ( ) => { const code = '[Route("{time}/{location}")]' ; const actual = StringUtil . IsCodeBlockStart ( code ) ; assert . equal ( actual , false ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : IsCodeBlockStart
        STATE   : -
        IN      : 'public async Task<string> GetInfoForTime(string location, double time)'
        OUT     : true
    ` , ( ) => { const code = 'public async Task<string> GetInfoForTime(string location, double time)' ; const actual = StringUtil . IsCodeBlockStart ( code ) ; assert . equal ( actual , true ) ; } ) ; } ) ; suite ( 'Utility.StringUtil.RemoveComment Tests' , ( ) => { test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : null
        OUT     : null
    ` , ( ) => { const code = null ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , null ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : ''
        OUT     : ''
    ` , ( ) => { const code = '' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , '' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : '/*foo*/'
        OUT     : ''
    ` , ( ) => { const code = '/*foo*/' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , '' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : 'bar/*foo*/fuga'
        OUT     : 'barfuga'
    ` , ( ) => { const code = 'bar/*foo*/fuga' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , 'barfuga' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : '/*foo'
        OUT     : '/*foo'
    ` , ( ) => { const code = '/*foo' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , '/*foo' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : '//foo'
        OUT     : ''
    ` , ( ) => { const code = '//foo' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , '' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : 'bar//foo'
        OUT     : ''
    ` , ( ) => { const code = 'bar//foo' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , 'bar' ) ; } ) ; test ( `
        Category: Black-box testing
        Class   : Utility.StringUtil
        Method  : RemoveComment
        STATE   : -
        IN      : '/*bar*/ //foo'
        OUT     : ' '
    ` , ( ) => { const code = '/*bar*/ //foo' ; const actual = StringUtil . RemoveComment ( code ) ; assert . equal ( actual , ' ' ) ; } ) ; } ) ;