From 6bba4771abddecad9e0020445935321080b3b1fc Mon Sep 17 00:00:00 2001 From: Pavel K Date: Sat, 9 Mar 2013 18:17:38 -0800 Subject: [PATCH 1/2] Added basic structure for app --- src/main/java/org/httpse/automation/App.java | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/main/java/org/httpse/automation/App.java b/src/main/java/org/httpse/automation/App.java index 51af839..573bde6 100644 --- a/src/main/java/org/httpse/automation/App.java +++ b/src/main/java/org/httpse/automation/App.java @@ -17,8 +17,42 @@ package org.httpse.automation; +import org.apache.commons.cli.BasicParser; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + // Place holder class public class App { + private final Options options; + private final CommandLine cmd; + + private void addOptions() { + // TODO: Print help, finish etc. + // TODO: Move to optionbuilder + options.addOption("help", false, "still in the works.."); + } + + private CommandLine parseOptions(final String[] args) { + try { + CommandLineParser parser = new BasicParser(); + return parser.parse(options, args); + } catch (Exception e) { + // TODO: Properly handle + e.printStackTrace(); + return null; + } + } + + // disallow external instances + private App(final String[] args) { + this.options = new Options(); + addOptions(); + this.cmd = parseOptions(args); + } + public static void main(String[] args) { + App app = new App(args); } } From c6650b3bfd32d1820094ecae8867d171f8bebda6 Mon Sep 17 00:00:00 2001 From: Pavel Kazakov Date: Fri, 6 Sep 2013 16:54:54 -0700 Subject: [PATCH 2/2] Removing old structure --- Makefile | 12 ---- README.txt => README.md | 2 + pom.xml | 37 ------------ src/main/java/org/httpse/automation/App.java | 58 ------------------- .../java/org/httpse/automation/AppTest.java | 29 ---------- 5 files changed, 2 insertions(+), 136 deletions(-) delete mode 100644 Makefile rename README.txt => README.md (89%) delete mode 100644 pom.xml delete mode 100644 src/main/java/org/httpse/automation/App.java delete mode 100644 src/test/java/org/httpse/automation/AppTest.java diff --git a/Makefile b/Makefile deleted file mode 100644 index d82153e..0000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/make -f - -# Basic wrapper for maven - -pkg: - mvn package -clean: - mvn clean -test: - mvn test - -.PHONY: pkg clean test diff --git a/README.txt b/README.md similarity index 89% rename from README.txt rename to README.md index 74cd9d1..ae749e0 100644 --- a/README.txt +++ b/README.md @@ -2,3 +2,5 @@ Repository for a test automation framework that can be used to test the Firefox extension "Https Everywhere" NOTE: This project was started only recently and currently does not work! + +TODO: convert to MD diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 16870c5..0000000 --- a/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - 4.0.0 - - org.httpse.automation - httpseautomation - 1.0 - jar - - httpseautomation - http://maven.apache.org - - - UTF-8 - - - - - commons-cli - commons-cli - 1.2 - - - org.seleniumhq.selenium - selenium-firefox-driver - 2.31.0 - - - org.testng - testng - 6.3.1 - test - - - - diff --git a/src/main/java/org/httpse/automation/App.java b/src/main/java/org/httpse/automation/App.java deleted file mode 100644 index 573bde6..0000000 --- a/src/main/java/org/httpse/automation/App.java +++ /dev/null @@ -1,58 +0,0 @@ -/* Automation framework for testing the firefox extension "HTTPS Everywhere." - * Copyright (C) 2013 Pavel Kazakov - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package org.httpse.automation; - -import org.apache.commons.cli.BasicParser; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -// Place holder class -public class App { - private final Options options; - private final CommandLine cmd; - - private void addOptions() { - // TODO: Print help, finish etc. - // TODO: Move to optionbuilder - options.addOption("help", false, "still in the works.."); - } - - private CommandLine parseOptions(final String[] args) { - try { - CommandLineParser parser = new BasicParser(); - return parser.parse(options, args); - } catch (Exception e) { - // TODO: Properly handle - e.printStackTrace(); - return null; - } - } - - // disallow external instances - private App(final String[] args) { - this.options = new Options(); - addOptions(); - this.cmd = parseOptions(args); - } - - public static void main(String[] args) { - App app = new App(args); - } -} diff --git a/src/test/java/org/httpse/automation/AppTest.java b/src/test/java/org/httpse/automation/AppTest.java deleted file mode 100644 index 6787cc9..0000000 --- a/src/test/java/org/httpse/automation/AppTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Automation framework for testing the firefox extension "HTTPS Everywhere." - * Copyright (C) 2013 Pavel Kazakov - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package org.httpse.automation; - -import static org.testng.Assert.assertEquals; -import org.testng.annotations.Test; - -// placeholder -public class AppTest { - @Test - public void testPlaceHolder() { - assertEquals("test", "test"); - } -}