View Ravichandran J.V.'s profile on LinkedIn RJV 's Blog: Behavior Driven Development with Tumbler Tweet @ravichandranjv

Translate

Monday, 12 November 2012

Behavior Driven Development with Tumbler

Will elaborate on comments and questions to this post :)

More on this can be found at - http://ravichandranjv.blogspot.in/2010/05/decision-table-in-slim.html

Also refer to this presentation by me on BDD and UADD at the Agile NCR conference  - http://tinyurl.com/d6xjfox


import static tumbler.Tumbler.*;

import org.junit.runner.Result;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
import tumbler.Scenario;
import tumbler.Story;
import org.hamcrest.BaseMatcher;
import org.hamcrest.core.IsEqual;
import org.hamcrest.core.IsNot;
import org.hamcrest.core.IsNull;
import org.hamcrest.core.IsSame;
import tumbler.JUnit44TumblerRunner;
import tumbler.TumblerRunner;

@RunWith(JUnit44TumblerRunner.class)
@Story("Generate genome sequence from values passed")
public class GenomeTest {
@Scenario("ATGAC")
    public void shouldGenerateCorrectPatern() {
        Given("A Genome sequence");
        GenomePattern gp = new GenomePattern();
        Object someValue=null;

        When("Genome pattern is to be generated");
        Result result = gp.generatePattern();

        Then("expect ATGAC");
        assertNull(result); // Making test pass as per TDD
    }
}

No comments: