KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > CloudContextTest


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10
11 package org.mmbase.bridge;
12
13 import junit.framework.*;
14
15
16 /**
17  * Test class <code>CloudContext</code> from the bridge package.
18  *
19  * @author Jaco de Groot
20  */

21 public class CloudContextTest extends TestCase {
22
23     public CloudContextTest(String JavaDoc name) {
24         super(name);
25     }
26
27     public void testListClouds() {
28         CloudContext cloudContext = ContextProvider.getDefaultCloudContext();
29         boolean defaultCloudFound = false;
30         StringList stringList = cloudContext.getCloudNames();
31         for (int i = 0; i < stringList.size(); i++) {
32             Cloud cloud = cloudContext.getCloud(stringList.getString(i));
33             if (cloud.getName().equals("mmbase")) {
34                 defaultCloudFound = true;
35             }
36         }
37         assertTrue(defaultCloudFound);
38     }
39
40 }
41
Popular Tags