- Scala Test-Driven Development
- Gaurav Sood
- 211字
- 2021-07-08 10:44:58
Problem statements
The problem statement, which we will define in this chapter, will be used throughout the book. In forthcoming chapters, we will build on this problem statement. We will be looking at building a base conversion API. We will start with an initial base 10 (decimal) number to base 2 (binary) conversions and vice versa. Then, we will add more bases for conversion.
Let's write this down in gherkin language. Gherkin is a business readable, domain-specific language that lets you describe a software's behavior without detailing how that behavior is implemented.
Feature: decimal to binary conversion:
As a user, I want to convert a decimal number to a binary number:
Scenario 1:
- Given I have a number A
- When I convert this number to a binary number
- Then, I get a binary equivalent B of the original decimal number
Scenario 2:
- Given I have binary number X
- When I convert this number to a decimal number
- Then, I get a decimal equivalent Y of the original binary number
Scenario 3:
- Given I have decimal number A
- When I convert A to binary to get binary number B
- And again convert B to decimal number C
- Then A is equal to C
Tip
To read more about gherkin language visit: https://github.com/cucumber/cucumber/wiki/Gherkin
- LaTeX Cookbook
- Reporting with Visual Studio and Crystal Reports
- Building a Game with Unity and Blender
- SQL Server 2012數(shù)據(jù)庫技術(shù)及應(yīng)用(微課版·第5版)
- Vue.js快速入門與深入實戰(zhàn)
- Learn Programming in Python with Cody Jackson
- Expert Android Programming
- Visual Foxpro 9.0數(shù)據(jù)庫程序設(shè)計教程
- C/C++數(shù)據(jù)結(jié)構(gòu)與算法速學(xué)速用大辭典
- PowerDesigner 16 從入門到精通
- Oracle 12c從入門到精通(視頻教學(xué)超值版)
- 軟件測試(慕課版)
- Android項目實戰(zhàn):博學(xué)谷
- Lync Server Cookbook
- Python深度學(xué)習(xí):基于PyTorch