xtd 0.2.0
Loading...
Searching...
No Matches
string_assert.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/string>
6#include "assert.hpp"
7#include <regex>
8
10namespace xtd {
12 namespace tunit {
25 class tunit_export_ string_assert final : private base_assert {
26 public:
28 string_assert() = delete;
30
32
56 static void are_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
57
80 static void are_not_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
81
93 static void contains(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
106 static void contains(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
107
132 static void does_not_contain(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
133
158 static void does_not_end_with(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
159
170 static void does_not_match(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
182 static void does_not_match(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
183
208 static void does_not_start_with(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
209
221 static void ends_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
234 static void ends_with(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
235
246 static void matches(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
258 static void matches(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
259
271 static void starts_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
284 static void starts_with(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
286 };
287 }
288}
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.hpp:47
static stack_frame current(const xtd::source_location &value=xtd::source_location::current()) noexcept
Crates a new xtd::diagnostics::stack_frame object corresponding to the location of the call site.
The base class for assert.
Definition base_assert.hpp:29
The string_assert class contains a collection of static methods that implement the most string assert...
Definition string_assert.hpp:25
static void are_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that two type are equal ignoring case.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that matches regex pattern.
static void starts_with(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void starts_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void does_not_contain(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string contains an item.
static void does_not_match(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that does not match regex pattern.
static void does_not_match(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that does not match regex pattern.
static void does_not_end_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that matches regex pattern.
static void ends_with(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void are_not_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that two type are not equal ignoring case.
static void are_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that two type are equal ignoring case.
static void contains(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string contains an item.
static void are_not_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that two type are not equal ignoring case.
static void does_not_end_with(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void does_not_contain(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string contains an item.
static void does_not_start_with(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void ends_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void does_not_start_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string starts with item.
static void contains(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Asserts that string contains an item.
#define tunit_export_
Define shared library export.
Definition tunit_export.hpp:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::tunit::assert class.