Permalink
Browse files

Melhorias no codigo.

  • Loading branch information...
1 parent ab12063 commit 7eb0ddc5bc8d1a7553ddae5d585d4419140af676 @tassiovirginio tassiovirginio committed Oct 22, 2011
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,31 +1,12 @@
package fa7.storys;
-import java.util.List;
-
-import org.jbehave.core.configuration.Configuration;
-import org.jbehave.core.configuration.MostUsefulConfiguration;
-import org.jbehave.core.io.LoadFromClasspath;
-import org.jbehave.core.junit.JUnitStory;
-import org.jbehave.core.reporters.Format;
-import org.jbehave.core.reporters.StoryReporterBuilder;
-import org.jbehave.core.steps.CandidateSteps;
-import org.jbehave.core.steps.InstanceStepsFactory;
-
import fa7.storys.steps.AlunoComecaAUsarJBehaveSteps;
-public class AlunoComecaAUsarJbehave extends JUnitStory {
- @Override
- public Configuration configuration() {
- return new MostUsefulConfiguration()
- .useStoryLoader(new LoadFromClasspath(this.getClass()))
- .useStoryReporterBuilder(
- new StoryReporterBuilder().withDefaultFormats()
- .withFormats(Format.CONSOLE, Format.TXT));
- }
-
- @Override
- public List<CandidateSteps> candidateSteps() {
- return new InstanceStepsFactory(configuration(),
- new AlunoComecaAUsarJBehaveSteps()).createCandidateSteps();
+public class AlunoComecaAUsarJbehave extends JUnitStoryFA7 {
+
+ public AlunoComecaAUsarJbehave() {
+ object = this;
+ objectSteps = new AlunoComecaAUsarJBehaveSteps();
}
+
}
@@ -1,31 +1,12 @@
package fa7.storys;
-import java.util.List;
-
-import org.jbehave.core.configuration.Configuration;
-import org.jbehave.core.configuration.MostUsefulConfiguration;
-import org.jbehave.core.io.LoadFromClasspath;
-import org.jbehave.core.junit.JUnitStory;
-import org.jbehave.core.reporters.Format;
-import org.jbehave.core.reporters.StoryReporterBuilder;
-import org.jbehave.core.steps.CandidateSteps;
-import org.jbehave.core.steps.InstanceStepsFactory;
-
import fa7.storys.steps.SaqueDeClienteSteps;
-public class ClienteRealizaSaque extends JUnitStory {
- @Override
- public Configuration configuration() {
- return new MostUsefulConfiguration()
- .useStoryLoader(new LoadFromClasspath(this.getClass()))
- .useStoryReporterBuilder(
- new StoryReporterBuilder().withDefaultFormats()
- .withFormats(Format.CONSOLE, Format.TXT));
+public class ClienteRealizaSaque extends JUnitStoryFA7 {
+
+ public ClienteRealizaSaque() {
+ object = this;
+ objectSteps = new SaqueDeClienteSteps();
}
- @Override
- public List<CandidateSteps> candidateSteps() {
- return new InstanceStepsFactory(configuration(),
- new SaqueDeClienteSteps()).createCandidateSteps();
- }
}
@@ -1,31 +1,11 @@
package fa7.storys;
-import java.util.List;
-
-import org.jbehave.core.configuration.Configuration;
-import org.jbehave.core.configuration.MostUsefulConfiguration;
-import org.jbehave.core.io.LoadFromClasspath;
-import org.jbehave.core.junit.JUnitStory;
-import org.jbehave.core.reporters.Format;
-import org.jbehave.core.reporters.StoryReporterBuilder;
-import org.jbehave.core.steps.CandidateSteps;
-import org.jbehave.core.steps.InstanceStepsFactory;
-
import fa7.storys.steps.SaqueDeClienteParametrizadoSteps;
-public class ClienteRealizaSaqueParametrizado extends JUnitStory {
- @Override
- public Configuration configuration() {
- return new MostUsefulConfiguration()
- .useStoryLoader(new LoadFromClasspath(this.getClass()))
- .useStoryReporterBuilder(
- new StoryReporterBuilder().withDefaultFormats()
- .withFormats(Format.CONSOLE, Format.TXT));
- }
-
- @Override
- public List<CandidateSteps> candidateSteps() {
- return new InstanceStepsFactory(configuration(),
- new SaqueDeClienteParametrizadoSteps()).createCandidateSteps();
+public class ClienteRealizaSaqueParametrizado extends JUnitStoryFA7 {
+
+ public ClienteRealizaSaqueParametrizado() {
+ object = this;
+ objectSteps = new SaqueDeClienteParametrizadoSteps();
}
}
@@ -1,31 +1,12 @@
package fa7.storys;
-import java.util.List;
-
-import org.jbehave.core.configuration.Configuration;
-import org.jbehave.core.configuration.MostUsefulConfiguration;
-import org.jbehave.core.io.LoadFromClasspath;
-import org.jbehave.core.junit.JUnitStory;
-import org.jbehave.core.reporters.Format;
-import org.jbehave.core.reporters.StoryReporterBuilder;
-import org.jbehave.core.steps.CandidateSteps;
-import org.jbehave.core.steps.InstanceStepsFactory;
-
import fa7.storys.steps.RegrasDoJogoSteps;
-public class RegrasDoJogo extends JUnitStory {
- @Override
- public Configuration configuration() {
- return new MostUsefulConfiguration()
- .useStoryLoader(new LoadFromClasspath(this.getClass()))
- .useStoryReporterBuilder(
- new StoryReporterBuilder().withDefaultFormats()
- .withFormats(Format.CONSOLE, Format.TXT));
- }
-
- @Override
- public List<CandidateSteps> candidateSteps() {
- return new InstanceStepsFactory(configuration(),
- new RegrasDoJogoSteps()).createCandidateSteps();
+public class RegrasDoJogo extends JUnitStoryFA7 {
+
+ public RegrasDoJogo() {
+ object = this;
+ objectSteps = new RegrasDoJogoSteps();
}
+
}
@@ -1,23 +0,0 @@
-#org.jbehave.core.reporters.PostStoryStatisticsCollector
-#Wed Oct 19 20:40:57 BRT 2011
-duration=1
-notAllowed=0
-examples=0
-scenariosNotAllowed=0
-pending=0
-stepsPending=0
-stepsNotPerformed=0
-scenariosSuccessful=0
-givenStoryScenarios=0
-givenStoryScenariosFailed=0
-stepsFailed=0
-scenarios=0
-givenStories=0
-stepsSuccessful=0
-steps=0
-givenStoryScenariosPending=0
-scenariosPending=0
-stepsIgnorable=0
-givenStoryScenariosNotAllowed=0
-scenariosFailed=0
-givenStoryScenariosSuccessful=0
@@ -1,3 +0,0 @@
-
-(AfterStories)
-
@@ -1,23 +0,0 @@
-#org.jbehave.core.reporters.PostStoryStatisticsCollector
-#Wed Oct 19 20:40:57 BRT 2011
-duration=5
-notAllowed=0
-examples=0
-scenariosNotAllowed=0
-pending=0
-stepsPending=0
-stepsNotPerformed=0
-scenariosSuccessful=0
-givenStoryScenarios=0
-givenStoryScenariosFailed=0
-stepsFailed=0
-scenarios=0
-givenStories=0
-stepsSuccessful=0
-steps=0
-givenStoryScenariosPending=0
-scenariosPending=0
-stepsIgnorable=0
-givenStoryScenariosNotAllowed=0
-scenariosFailed=0
-givenStoryScenariosSuccessful=0
@@ -1,3 +0,0 @@
-
-(BeforeStories)
-
@@ -1,23 +0,0 @@
-#org.jbehave.core.reporters.PostStoryStatisticsCollector
-#Wed Oct 19 20:40:57 BRT 2011
-duration=170
-notAllowed=0
-examples=2
-scenariosNotAllowed=0
-pending=0
-stepsPending=0
-stepsNotPerformed=0
-scenariosSuccessful=1
-givenStoryScenarios=0
-givenStoryScenariosFailed=0
-stepsFailed=0
-scenarios=1
-givenStories=0
-stepsSuccessful=6
-steps=6
-givenStoryScenariosPending=0
-scenariosPending=0
-stepsIgnorable=0
-givenStoryScenariosNotAllowed=0
-scenariosFailed=0
-givenStoryScenariosSuccessful=0
@@ -1,27 +0,0 @@
-
-(fa7/storys/cliente_realiza_saque_parametrizado.story)
-Meta:
-@author Joazinho
-
-Scenario: Cliente especial com saldo negativo
-Examples:
-Given um cliente especial com saldo atual de <saldoAtual> reais
-When for solicitado um saque no valor <valorDoSaque> reais
-Then deve efetuar um saque e atualizar o saldo da conta para <novoSaldo> reais
-
-|saldoAtual|valorDoSaque|novoSaldo|
-|-200|100|-300|
-|-200|200|-400|
-
-Example: {saldoAtual=-200, valorDoSaque=100, novoSaldo=-300}
-Given um cliente especial com saldo atual de -200 reais
-When for solicitado um saque no valor 100 reais
-Then deve efetuar um saque e atualizar o saldo da conta para -300 reais
-
-Example: {saldoAtual=-200, valorDoSaque=200, novoSaldo=-400}
-Given um cliente especial com saldo atual de -200 reais
-When for solicitado um saque no valor 200 reais
-Then deve efetuar um saque e atualizar o saldo da conta para -400 reais
-
-
-
@@ -1,58 +0,0 @@
-<html>
-<head>
-<title>AfterStories</title>
-<style type="text/css" media="all">
-@import url( "./style/jbehave-core.css" );
-</style>
-</head>
-<body>
-
-<script type="syntaxhighlighter" class="brush: plain"><![CDATA[
-#org.jbehave.core.reporters.PostStoryStatisticsCollector
-#Wed Oct 19 20:40:57 BRT 2011
-duration=1
-notAllowed=0
-examples=0
-scenariosNotAllowed=0
-pending=0
-stepsPending=0
-stepsNotPerformed=0
-scenariosSuccessful=0
-givenStoryScenarios=0
-givenStoryScenariosFailed=0
-stepsFailed=0
-scenarios=0
-givenStories=0
-stepsSuccessful=0
-steps=0
-givenStoryScenariosPending=0
-scenariosPending=0
-stepsIgnorable=0
-givenStoryScenariosNotAllowed=0
-scenariosFailed=0
-givenStoryScenariosSuccessful=0
-
-]]></script>
-</body>
-<!-- SyntaxHighlighter resources: should be included at end of body -->
-<link rel="stylesheet" type="text/css" href="./style/sh-3.0.83/shCore.css"/>
-<link rel="stylesheet" type="text/css" href="./style/sh-3.0.83/shThemeRDark.css"/>
-<script language="javascript" src="./js/sh-3.0.83/shCore.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushBash.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushCss.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushDiff.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushGroovy.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushJava.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushJScript.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushPlain.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushPython.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushRuby.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushScala.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushXml.js"></script>
-<script language="javascript" src="./js/shBrushBdd.js"></script>
-<script type="text/javascript">
- SyntaxHighlighter.defaults['gutter'] = false;
- SyntaxHighlighter.defaults['toolbar'] = false;
- SyntaxHighlighter.all();
-</script>
-</html>
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title>AfterStories</title>
-<style type="text/css" media="all">
-@import url( "./style/jbehave-core.css" );
-</style>
-</head>
-<body>
-
-<script type="syntaxhighlighter" class="brush: txt"><![CDATA[
-
-(AfterStories)
-
-
-]]></script>
-</body>
-<!-- SyntaxHighlighter resources: should be included at end of body -->
-<link rel="stylesheet" type="text/css" href="./style/sh-3.0.83/shCore.css"/>
-<link rel="stylesheet" type="text/css" href="./style/sh-3.0.83/shThemeRDark.css"/>
-<script language="javascript" src="./js/sh-3.0.83/shCore.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushBash.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushCss.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushDiff.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushGroovy.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushJava.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushJScript.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushPlain.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushPython.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushRuby.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushScala.js"></script>
-<script language="javascript" src="./js/sh-3.0.83/shBrushXml.js"></script>
-<script language="javascript" src="./js/shBrushBdd.js"></script>
-<script type="text/javascript">
- SyntaxHighlighter.defaults['gutter'] = false;
- SyntaxHighlighter.defaults['toolbar'] = false;
- SyntaxHighlighter.all();
-</script>
-</html>
Oops, something went wrong.

0 comments on commit 7eb0ddc

Please sign in to comment.