Author: tommaso
Date: Tue Nov 22 09:39:51 2011
New Revision: 1204880
URL: http://svn.apache.org/viewvc?rev=1204880&view=rev
Log:
[HAMA-477] - fixed AL header and javadoc for ShortestPaths, added simple
CombineExample and RandBench test cases
Added:
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/CombineExampleTest.java
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/RandBenchTest.java
Modified:
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/ShortestPathsTest.java
Added:
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/CombineExampleTest.java
URL:
http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/CombineExampleTest.java?rev=1204880&view=auto
==============================================================================
---
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/CombineExampleTest.java
(added)
+++
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/CombineExampleTest.java
Tue Nov 22 09:39:51 2011
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.examples;
+
+import org.junit.Test;
+
+import static org.junit.Assert.fail;
+
+/**
+ * Testcase for {@link org.apache.hama.examples.CombineExample}
+ */
+public class CombineExampleTest {
+ @Test
+ public void testCorrectCombineExecution() {
+ try {
+ CombineExample.main(new String[]{});
+ } catch (Exception e) {
+ fail(e.getLocalizedMessage());
+ }
+ }
+
+}
Added:
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/RandBenchTest.java
URL:
http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/RandBenchTest.java?rev=1204880&view=auto
==============================================================================
---
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/RandBenchTest.java
(added)
+++
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/RandBenchTest.java
Tue Nov 22 09:39:51 2011
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.examples;
+
+import org.junit.Test;
+
+import static org.junit.Assert.fail;
+
+/**
+ * Testcase for {@link org.apache.hama.examples.RandBench}
+ */
+public class RandBenchTest {
+ @Test
+ public void testCorrectRandBenchExecution() {
+ try {
+ RandBench.main(new String[]{"10","100","200"});
+ } catch (Exception e) {
+ fail(e.getLocalizedMessage());
+ }
+ }
+
+ @Test
+ public void testRandBenchExecutionWithEmptyArgs() {
+ try {
+ RandBench.main(new String[10]);
+ fail("RandBench should fail if the argument list has size < 3");
+ } catch (Exception e) {
+ // everything ok
+ }
+ }
+
+}
Modified:
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/ShortestPathsTest.java
URL:
http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/ShortestPathsTest.java?rev=1204880&r1=1204879&r2=1204880&view=diff
==============================================================================
---
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/ShortestPathsTest.java
(original)
+++
incubator/hama/trunk/examples/src/test/java/org/apache/hama/examples/ShortestPathsTest.java
Tue Nov 22 09:39:51 2011
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.hama.examples;
import org.junit.Test;
@@ -5,8 +22,9 @@ import org.junit.Test;
import static org.junit.Assert.fail;
/**
- * @author tommaso
+ * Testcase for {@link ShortestPaths}
*/
+
public class ShortestPathsTest {
@Test