• Home
Name Date Size #Lines LOC

..--

src/22-Mar-2025-4523

test/22-Mar-2025-13993

readme.mdD22-Mar-20251.3 KiB4127

readme.md

1# Unity Project - BDD Feature
2
3Unity's Behavior-Driven Development (BDD) test feature. It allows developers to structure and describe various phases (Given, When, Then) of a test scenario in a BDD-style format.
4
5## Introduction
6
7This project is based on the Unity framework originally created by Mike Karlesky, Mark VanderVoord, and Greg Williams in 2007. The project extends Unity by providing macros to define BDD structures with descriptive elements. Feature added by Michael Gene Brockus (Dreamer).
8
9## License
10
11This project is distributed under the MIT License. See the [license.txt](license.txt) file for more information.
12
13## Usage
14
15### BDD Macros
16
17The provided BDD macros allow you to structure your test scenarios in a descriptive manner. These macros are for descriptive purposes only and do not have functional behavior.
18
19- `GIVEN(description)`: Describes the "Given" phase of a test scenario.
20- `WHEN(description)`: Describes the "When" phase of a test scenario.
21- `THEN(description)`: Describes the "Then" phase of a test scenario.
22
23Example usage:
24
25```c
26GIVEN("a valid input") {
27    // Test setup and context
28    // ...
29
30    WHEN("the input is processed") {
31        // Perform the action
32        // ...
33
34        THEN("the expected outcome occurs") {
35            // Assert the outcome
36            // ...
37        }
38    }
39}
40```
41