Sha256: ad9ccb2278d5360a106d3aaa2ebe7424139697061e541f27578e6727fbffe15d

Contents?: true

Size: 1.67 KB

Versions: 72

Compression:

Stored size: 1.67 KB

Contents

component extends="testbox.system.BaseSpec" {

	function beforeAll(){
	  SUT = createObject( 'Pangram' );
	}

	function run(){
	
		describe( "My Pangram class", function(){			

			describe( 'Check if the given string is an pangram', function(){

				it( 'sentence empty', function(){
					expect( SUT.isPangram( input='' ) ).toBeFalse();
				});

				it( 'pangram with only lower case', function(){
					expect( SUT.isPangram( input='the quick brown fox jumps over the lazy dog' ) ).toBeTrue();
				});

				it( 'missing character ''x''', function(){
					expect( SUT.isPangram( input='a quick movement of the enemy will jeopardize five gunboats' ) ).toBeFalse();
				});

				it( 'another missing character ''x''', function(){
					expect( SUT.isPangram( input='the quick brown fish jumps over the lazy dog' ) ).toBeFalse();
				});

				it( 'pangram with underscores', function(){
					expect( SUT.isPangram( input='the_quick_brown_fox_jumps_over_the_lazy_dog' ) ).toBeTrue();
				});

				it( 'pangram with numbers', function(){
					expect( SUT.isPangram( input='the 1 quick brown fox jumps over the 2 lazy dogs' ) ).toBeTrue();
				});

				it( 'missing letters replaced by numbers', function(){
					expect( SUT.isPangram( input='7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog' ) ).toBeFalse();
				});

				it( 'pangram with mixed case and punctuation', function(){
					expect( SUT.isPangram( input='"Five quacking Zephyrs jolt my wax bed."' ) ).toBeTrue();
				});

				it( 'upper and lower case versions of the same character should not be counted separately', function(){
					expect( SUT.isPangram( input='the quick brown fox jumps over with lazy FX' ) ).toBeFalse();
				});

			});

		});
		
	}
 
}

Version data entries

72 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.104 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.103 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.102 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.101 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.100 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.99 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.98 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.97 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.96 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.95 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.94 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.93 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.92 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.91 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.90 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.89 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.88 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.87 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.86 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.85 tracks/cfml/exercises/pangram/PangramTest.cfc