Skip to content

henleo/AcceptIt

 
 

Repository files navigation

AcceptIt

Branch Travis CI Code Coverage
master Build Status
develop Build Status Coverage Status

Installation

  1. Make sure you have metacello-work installed in your image.

  2. Follow the following Guide for the git repo setup If you follow the guide there is no need for Step 3.

  3. AcceptIt can be acquired by running following code in the workspace:

Metacello new
  baseline: 'AcceptIt';
  repository: 'github://hpi-swa-teaching/AcceptIt/packages';
  get;
  load

Usage

  1. Choose a class to test like for example "MySuperCalculator"

  2. Create a user story by running the following code in the workspace:

ACUserStory userStoryNamed: 'ACCalculatorUserStory' 

story: 
'AC Calculator User Story
In order to test my sophisticated calculator class
As a developer
I want to do some complicated calculations'

withCategory: 'acceptitTest-calculator'

fullText: 
'AC Calculator User Story
In order to test my sophisticated calculator class
As a developer
I want to do some complicated calculations'.
  1. Create a library by running the following code in the workspace:
ACLibrary generateNewLibrary: #MySuperCalculator
  1. Add a libraries method on class side to your user story class and make it return the class of it's library
libraries

  ^ {MySuperCalculatorLibrary}

  1. write the test scenario in your user story
minimal viable user story

Given A is true
When I do nothing
Then I expect A to be true
  1. Add needed methods to the library like
(given) A is :aBool
  self class a: aBool
  
(when) I do nothing

(then) I expect A to be :aBool
  assert: [self class a = aBool]
  1. Add the according methods on class side (also add an instance variable a on class side):
a: aBool
  a := aBool.
  
a
  ^a
  1. Run the Test-Runner
ACTestRunner open

About

SWT 2018 Group 12

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Smalltalk 99.3%
  • HTML 0.7%