Skip to content

Commit

Permalink
Features e cenários para notícias e importação de arquivos bibtex.
Browse files Browse the repository at this point in the history
  • Loading branch information
diogovss authored and rafaelbrandao committed Apr 25, 2013
1 parent e6f1cd5 commit 744e823
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/cucumber/BibtexImport.feature
Original file line number Diff line number Diff line change
@@ -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*
59 changes: 59 additions & 0 deletions test/cucumber/steps/BibtexImportSteps.groovy
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit 744e823

Please sign in to comment.