View Javadoc

1   /*
2    * JCaptcha, the open source java framework for captcha definition and integration
3    * Copyright (c)  2007 jcaptcha.net. All Rights Reserved.
4    * See the LICENSE.txt file distributed with this package.
5    */
6   
7   /*
8    * jcaptcha, the open source java framework for captcha definition and integration
9    * copyright (c)  2007 jcaptcha.net. All Rights Reserved.
10   * See the LICENSE.txt file distributed with this package.
11   */
12  
13  /*
14   * jcaptcha, the open source java framework for captcha definition and integration
15   * copyright (c)  2007 jcaptcha.net. All Rights Reserved.
16   * See the LICENSE.txt file distributed with this package.
17   */
18  
19  package com.octo.captcha.sound.speller;
20  
21  import junit.framework.TestCase;
22  
23  import com.octo.captcha.CaptchaException;
24  import com.octo.captcha.component.word.wordgenerator.RandomWordGenerator;
25  import com.octo.captcha.sound.WordToSoundMock;
26  
27  public class SoundSpellerFactoryTest extends TestCase {
28  
29      public void testSpellerSoundFactory() throws Exception {
30          try {
31              new SpellerSoundFactory(null, null, null);
32              fail("Test is not implemented");
33          } catch (CaptchaException e) {
34              assertNotNull(e.getMessage());
35          }
36          try {
37              new SpellerSoundFactory(new RandomWordGenerator("a"), null, null);
38              fail("Test is not implemented");
39          } catch (CaptchaException e) {
40              assertNotNull(e.getMessage());
41          }
42  
43          try {
44              new SpellerSoundFactory(null, new WordToSoundMock(), null);
45              fail("Test is not implemented");
46          } catch (CaptchaException e) {
47              assertNotNull(e.getMessage());
48          }
49      }
50  
51  }