feat: BDD test helpers

This commit is contained in:
Aravinth Manivannan 2024-05-17 23:27:33 +05:30
parent bd34170d6e
commit eba678b6de
Signed by: realaravinth
GPG key ID: F8F50389936984FF
2 changed files with 16 additions and 0 deletions

11
src/tests/bdd.rs Normal file
View file

@ -0,0 +1,11 @@
// SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
pub const IS_CALLED_ONLY_ONCE: Option<usize> = Some(1);
pub const IS_NEVER_CALLED: Option<usize> = None;
pub const IS_CALLED_ONLY_TWICE: Option<usize> = Some(2);
pub const RETURNS_RANDOM_STRING: &str = "test_random_string";
pub const RETURNS_TRUE: bool = true;
pub const RETURNS_FALSE: bool = false;

5
src/tests/mod.rs Normal file
View file

@ -0,0 +1,5 @@
// SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
pub mod bdd;