From 744e823f47064f70c7efbaed96a941256bf5a212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diogo=20Vin=C3=ADcius?= Date: Mon, 8 Apr 2013 19:36:50 -0300 Subject: [PATCH] =?UTF-8?q?Features=20e=20cen=C3=A1rios=20para=20not=C3=AD?= =?UTF-8?q?cias=20e=20importa=C3=A7=C3=A3o=20de=20arquivos=20bibtex.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cucumber/BibtexImport.feature | 24 ++++++++ test/cucumber/steps/BibtexImportSteps.groovy | 59 ++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 test/cucumber/BibtexImport.feature create mode 100644 test/cucumber/steps/BibtexImportSteps.groovy diff --git a/test/cucumber/BibtexImport.feature b/test/cucumber/BibtexImport.feature new file mode 100644 index 00000000..d6cb0fdd --- /dev/null +++ b/test/cucumber/BibtexImport.feature @@ -0,0 +1,24 @@ +@i9n +Feature: BibtexImport + As a member of a research group + I want to import a bibtex file + So that the system register yours corresponding publications + + Scenario: import bibtex + Given the bibtex file + When I try to upload the bibtex file + Then is created all corresponding publications + And all of then are stored + + Scenario: bibtex file unformatted + Given the file bibtex unformatted + When I try to upload the bibtex file unformatted + Then the system output the message error "bibtex file unformatted" + And the file is not accepted* + + Scenario: bibtex file with several publication types + Given the bibtex file with one Book Chapter and two Technical Report + When I try to upload the bibtex file + Then is created one Book Chapter publication + And is created two Technical Report publications + And all of then are stored* \ No newline at end of file diff --git a/test/cucumber/steps/BibtexImportSteps.groovy b/test/cucumber/steps/BibtexImportSteps.groovy new file mode 100644 index 00000000..af0c6e74 --- /dev/null +++ b/test/cucumber/steps/BibtexImportSteps.groovy @@ -0,0 +1,59 @@ +import cucumber.runtime.PendingException; +import static cucumber.api.groovy.EN.* + +//You can implement missing steps with the snippets below: + +Given(~'^the bibtex file$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +When(~'^I try to upload the bibtex file$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Then(~'^is created all corresponding publications$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Then(~'^all of then are stored$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Given(~'^the file bibtex unformatted$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +When(~'^I try to upload the bibtex file unformatted$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Then(~'^the system output the message error "([^"]*)"$') { String arg1 -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Then(~'^the file is not accepted$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Given(~'^the bibtex file with one Book Chapter and two Technical Report$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Then(~'^is created one Book Chapter publication$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} + +Then(~'^is created two Technical Report publications$') { -> + // Express the Regexp above with the code you wish you had + throw new PendingException() +} \ No newline at end of file