Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
fixes javadoc in multiple services and utility classes
Browse files Browse the repository at this point in the history
  • Loading branch information
prb112 committed Nov 4, 2015
1 parent 8a361fa commit ecdd2f3
Show file tree
Hide file tree
Showing 43 changed files with 246 additions and 297 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,10 @@
import com.ibm.sbt.automation.core.test.pageobjects.ResultPage;
import com.ibm.sbt.automation.core.test.pageobjects.SbtWebResultPage;


/*
* © Copyright IBM Corp. 2013
*
* Licensed 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.
*/

/**
* @author DavidRyan
*
* @date 27 may 2013
* @since 27 may 2013
*/
public class AcmeEnvironment extends TestEnvironment {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
* @author mkataria
* @author mwallace
*
* @date Jan 10, 2013
* @since Jan 10, 2013
*/
public abstract class TestEnvironment extends com.ibm.sbt.test.lib.TestEnvironment{

Expand Down Expand Up @@ -210,7 +210,7 @@ public void run() {
* Return the specified test property
*
* @param name
* @return
* @return {String}
*/
public static String getProperty(String name) {
TestEnvironment environment = TestEnvironmentFactory.getEnvironment();
Expand Down Expand Up @@ -252,7 +252,7 @@ public void disableSmartCloud() {
/**
* Return true if SmartCloud environment is enabled.
*
* @return
* @return {boolean}
*/
public boolean isSmartCloud() {
return smartCloud;
Expand All @@ -261,7 +261,7 @@ public boolean isSmartCloud() {
/**
* Return true if mock transport is being used.
*
* @return
* @return {boolean}
*/
public boolean isMockTransport() {
return properties.getProperty(PROP_ENABLE_MOCKTRANSPORT, "false")
Expand All @@ -271,7 +271,7 @@ public boolean isMockTransport() {
/**
* Return true if debug transport is being used.
*
* @return
* @return {boolean}
*/
public boolean isDebugTransport() {
return properties.getProperty(PROP_ENABLE_DEBUGTRANSPORT, "false")
Expand All @@ -281,7 +281,7 @@ public boolean isDebugTransport() {
/**
* Return true if test data should be overwritten.
*
* @return
* @return {boolean}
*/
public boolean isOverwriteTestdata() {
return properties.getProperty(PROP_ENABLE_OVERWRITETESTDATA, "false")
Expand Down Expand Up @@ -322,7 +322,7 @@ public void addSnippetParam(String key, String[] values) {
/**
* Return the WebDriver
*
* @return
* @return {WebDriver}
*/
public WebDriver getWebDriver() {
// browser to test with
Expand Down Expand Up @@ -647,7 +647,7 @@ protected void handleOAuth20(BaseTest baseTest) {
*
* @param form
*
* @return
* @return {AuthType}
*/
public AuthType detectAuthType(BaseTest baseTest, WebElement loginForm) {
// if results are available then no need to check for authentication
Expand Down Expand Up @@ -1146,7 +1146,7 @@ public boolean isLibraryVersion(String version) {
* @param lib
* a library version, using non dotted format (i.e. 182 for
* jquery 1.8.2, 143 for dojo 1.4.3)
* @return
* @return {boolean}
*/
public boolean isLibraryVersionGreatherThan(String version) {
if (jsLib == null || version == null)
Expand All @@ -1169,7 +1169,7 @@ public WebDriver getCurrentDriver() {
/**
* Return true if screenshots should be taken.
*
* @return
* @return {boolean}
*/
public boolean isTakeScreenshots() {
return takeScreenshot;
Expand All @@ -1178,7 +1178,7 @@ public boolean isTakeScreenshots() {
/**
* Return the path where screenshots should be stored.
*
* @return
* @return {String}
*/
public String getScreenshotsPath() {
return screenshotsPath;
Expand Down Expand Up @@ -1230,7 +1230,7 @@ protected Properties loadProperties() {
/**
* @param baseTest
* @param url
* @return
* @return {String}
*/
protected String addSnippetParams(BaseTest baseTest, String url) {
Map<String, String> params = baseTest.getSnippetParams();
Expand Down Expand Up @@ -1350,14 +1350,14 @@ private void failIfPageCrashed(WebDriver webDriver) {
* Compute the launch URL for the specified test
*
* @param baseTest
* @return
* @return {String}
*/
abstract public String computeLaunchUrl(BaseTest baseTest);

/**
* Return the result page for the current web driver
*
* @return
* @return {ResultPage}
*/
public ResultPage getPageObject() {
return getPageObject(getCurrentDriver());
Expand All @@ -1367,7 +1367,7 @@ public ResultPage getPageObject() {
* Return the result page for the specified web driver
*
* @param webDriver
* @return
* @return {ResultPage}
*/
abstract public ResultPage getPageObject(WebDriver webDriver);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.ibm.sbt.services.client.connections.communities.CommunityService;
/**
* @author Francis
* @date 26 Mar 2013
* @since 26 Mar 2013
*/
public class BaseActivityStreamTest extends BaseWrapperTest{

Expand All @@ -34,7 +34,7 @@ public class BaseActivityStreamTest extends BaseWrapperTest{

/**
* creates community, initialising context if needed.
* @return
* @return {String}
* @throws CommunityServiceException
*/
public String createCommunity(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/**
* @author mwallace
*
* @date 5 Mar 2013
* @since 5 Mar 2013
*/
public class BaseApiTest extends BaseTest {

Expand Down Expand Up @@ -96,15 +96,15 @@ protected void loginConnections() throws AuthenticationException {

/**
* @param snippetId
* @return
* @return {JavaScriptPreviewPage}
*/
public JavaScriptPreviewPage executeSnippet(String snippetId) {
return executeSnippet(snippetId, 0);
}

/**
* @param snippetId
* @return
* @return {JavaScriptPreviewPage}
*/
public JavaScriptPreviewPage executeSnippet(String snippetId, long delay) {
this.snippetId = snippetId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @author mwallace
*
* @date 5 Mar 2013
* @since 5 Mar 2013
*/
public class BaseAuthJavaServiceTest extends BaseServiceTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* @author mwallace
*
* @date 5 Mar 2013
* @since 5 Mar 2013
*/
public class BaseAuthServiceTest extends BaseServiceTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public static JSSnippet getJsSnippet(String snippetName) {
/**
* Get a RootNode object which allows JSSnippets to be searched and manipulated.
*
* @param context
* @return RootNode of the local JSSnippets.
*/
public static RootNode getJsSnippets(){
Expand All @@ -59,9 +58,7 @@ public static RootNode getJsSnippets(){
/**
* Get JS snippets in JSON format, including sbtx.sample.web's JS snippets.
*
* @param context
* @param request
* @return JSSnippets in JSON format.
* @return {String} JSSnippets in JSON format.
*/
public static String getJsSnippetsAsJson() {
RootNode root = getJsSnippets();
Expand All @@ -72,10 +69,8 @@ public static String getJsSnippetsAsJson() {
/**
* Get a JavaSnippet by name.
*
* @param context
* @param request
* @param snippetName
* @return JavaSnippet corresponding to snippetName
* @return {JavaSnippet} corresponding to snippetName
*/
public static JavaSnippet getJavaSnippet(String snippetName) {
JavaSnippet result = (JavaSnippet) getAsset(snippetName, new JavaSnippetNodeFactory(), javaRootPath);
Expand All @@ -86,7 +81,7 @@ public static JavaSnippet getJavaSnippet(String snippetName) {
* Get a RootNode object which allows JavaSnippets to be searched and manipulated.
*
* @param context
* @return RootNode of the local JavaSnippets.
* @return {RootNode} of the local JavaSnippets.
*/
public static RootNode getJavaSnippets(){
return getSnippets(new JavaSnippetNodeFactory(), javaRootPath);
Expand All @@ -95,8 +90,7 @@ public static RootNode getJavaSnippets(){
/**
* Returns the root VFSFile for JS Samples.
*
* @param context
* @return
* @return {VFSFile}
*/
public static VFSFile getJsRootFile(){
return getRootFile(jsRootPath);
Expand All @@ -105,12 +99,10 @@ public static VFSFile getJsRootFile(){
/**
* Returns an Asset based on its name, NodeFactory type and root path.
*
* @param context
* @param request
* @param assetName
* @param nodeFactory
* @param rootPath
* @return
* @return {Asset}
*/
private static Asset getAsset(String assetName, NodeFactory nodeFactory, String rootPath){
try {
Expand All @@ -124,7 +116,6 @@ private static Asset getAsset(String assetName, NodeFactory nodeFactory, String
/**
* Returns a VFSFile for the given path and context.
*
* @param context
* @param relPath The folder path.
* @return VFSFile from the relPath and context.
*/
Expand All @@ -136,7 +127,6 @@ private static VFSFile getRootFile(String relPath) {
/**
* Get a RootNode object corresponding to the NodeFactory type and ServletContext
*
* @param context
* @param nodeFactory The NodeFactory of the type of snippet to be retrieved.
* @param path The path to the root of the snippets to be retrieved.
* @return RootNode of the Snippets.
Expand All @@ -155,8 +145,7 @@ private static RootNode getSnippets( NodeFactory nodeFactory, String path){
/**
* A method which will, for a given root folder and NodeFactory, return the corresponding RootNode of Snippets.
*
* @param context
* @param file The root folder of the snippets.
* @param {VFSFile} file
* @param nodeFactory The NodeFactory corresponding to the snippet type.
* @return RootNode of snippets, which allows search and manipulation of snippets.
* @throws IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* @author mwallace
*
* @date 5 Mar 2013
* @since 5 Mar 2013
*/
public class BaseGridTest extends BaseTest {

Expand All @@ -39,7 +39,7 @@ public BaseGridTest() {

/**
* Return true if a Grid was created on the page i.e. could find table, tbody and multiple tr's
* @return
* @return {boolean}
*/
protected boolean checkGrid(String snippetId) {
return checkGrid(snippetId, false, false);
Expand All @@ -51,7 +51,7 @@ protected boolean isEnvironmentValid() {
}
/**
* Return true if a Grid was created on the page i.e. could find table, tbody and multiple tr's
* @return
* @return {boolean}
*/
protected boolean checkGrid(String snippetId, boolean hasPager) {
return checkGrid(snippetId, hasPager, false);
Expand All @@ -65,7 +65,7 @@ protected boolean checkGrid(String snippetId, boolean hasPager, boolean hasSorte

/**
* Return true if a Grid was created on the page i.e. could find table, tbody and multiple tr's
* @return
* @return {boolean}
*/
protected boolean checkGrid(GridResultPage resultPage, boolean hasPager, boolean hasSorter, String snippetId) {

Expand Down Expand Up @@ -127,7 +127,7 @@ protected boolean checkGrid(GridResultPage resultPage, boolean hasPager, boolean

/**
* @param resultPage
* @return
* @return {boolean}
*/
protected boolean checkPager(GridResultPage gridPage,String[] rows) {
GridPagerPage gridPager = gridPage.getGridPager();
Expand Down Expand Up @@ -187,7 +187,7 @@ protected boolean checkPager(GridResultPage gridPage,String[] rows) {

/**
* @param resultPage
* @return
* @return {boolean}
*/
protected boolean checkSorter(GridResultPage resultPage, String[] rows) {
boolean sortingIsOkay = true;
Expand Down Expand Up @@ -218,7 +218,7 @@ protected boolean checkSorter(GridResultPage resultPage, String[] rows) {
* Launch the grid snippet and return a GridResultPage
*
* @param snippetId
* @return
* @return {GridResultPage}
*/
protected GridResultPage launchGrid(String snippetId) {
ResultPage resultPage = super.launchSnippet(snippetId, authType);
Expand All @@ -229,7 +229,7 @@ protected GridResultPage launchGrid(String snippetId) {
* Wrap the environment result page in a GridResultPage
*
* @param resultPage
* @return
* @return {GridResultPage}
*/
protected GridResultPage wrapResultPage(ResultPage resultPage) {
return new GridResultPage(resultPage);
Expand Down
Loading

0 comments on commit ecdd2f3

Please sign in to comment.