Skip to content

Commit

Permalink
Moved old test to a temp folder, this will be changed soon, finishing…
Browse files Browse the repository at this point in the history
… project with helpers from OptaPlanner tutorial project
  • Loading branch information
jefersonla committed May 30, 2017
1 parent ece45c7 commit 846996d
Show file tree
Hide file tree
Showing 21 changed files with 147 additions and 188 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/main/java/br/ufba/dcc/wiser/fot/balance/Bundles.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ public Bundles(String mvn_artifact, String mvn_group, String mvn_version,
this(mvn_artifact, mvn_group, mvn_version, null, bundle_cost);
}

/**
*
* Blank constructor for clone operations
*
*/
public Bundles(){
this("","","", 0);
}

/**
*
* Return maven installation URL.
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/br/ufba/dcc/wiser/fot/balance/Group.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ public Group(String group_name) {
/* Create the bundle list */
bundles_list = new HashSet<>();
}

/**
*
* Create a FoT Balance group for clone.
*
*/
public Group(){
this("");
}

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ConfigLoader {

private ConfigLoader(){}

public static ConfigFile ConfigLoader(String config_file_url){
public static ConfigFile configLoader(String config_file_url){

/* Configuration File */
FileReader config_file_reader;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[
{
"group_name": "composition",
"bundles_list": [
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
}
]
},
{
"group_name": "storage",
"bundles_list": [
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
},
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
}
]
},
{
"group_name": "basic",
"bundles_list": [
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
},
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
}
]
},
{
"group_name": "discovery",
"bundles_list": [
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
},
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
}
]
},
{
"group_name": "localization",
"bundles_list": [
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
},
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
}
]
},
{
"group_name": "security",
"bundles_list": [
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",

"bundleCost" : 1
},
{
"groupId" : "groupId",
"artifactId" : "artifactId",
"artifactVersion" : "1.0.0",
"bundleCost" : 1
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"host_id": "Host 1",
"groups_list": [
"security",
"basic"
]
},
{
"host_id": "Host 2",
"groups_list": [
"localization",
"basic"
]
},
{
"host_id": "Host 3",
"groups_list": [
"discovery"
]
}
]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ public void testBundleGetKarafUrl_Exception(){
Bundles test_bundle = TestSupport.initBundleObject();
test_bundle.disassociateHost();

boolean test_result;
boolean test_result = false;
try{
test_bundle.getKarafInstallURL();
test_result = false;
} catch(UnassociatedHostException e){
test_result = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package br.ufba.dcc.wiser.fot.balance.tests;

import com.google.gson.Gson;
import static org.junit.Assert.assertEquals;
import org.junit.Test;

Expand Down Expand Up @@ -53,6 +54,10 @@ public class ConfigLoaderTest extends TestSupport{
@Test
public void testConfigFile(){
// TODO
Gson gson = new Gson();



assertEquals("[Testing] Checking if ", 0, 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public class GroupTest extends TestSupport {

@Test
public void testGroupAddHost(){


assertEquals("[Testing] Checking Karaf install url", null, null);
//assertEquals("[Testing] Checking Karaf install url", null, null);
}

}

0 comments on commit 846996d

Please sign in to comment.