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.64 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.63 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.62 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.61 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.60 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.59 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.58 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.57 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.56 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.55 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.54 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.53 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.52 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.51 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.50 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.49 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.48 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.47 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.46 tracks/cfml/exercises/pangram/PangramTest.cfc
trackler-2.2.1.45 tracks/cfml/exercises/pangram/PangramTest.cfc