xtd 0.2.0
Loading...
Searching...
No Matches
string_valid.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "valid.hpp"
6#include "string_assert.hpp"
7
9namespace xtd {
11 namespace tunit {
23 class tunit_export_ string_valid final : private base_assert {
24 public:
26 string_valid() = delete;
28
30
52 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());
53
74 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());
75
86 static void contains(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
98 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());
99
122 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());
123
146 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());
147
157 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());
168 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());
169
192 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());
193
204 static void ends_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
216 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());
217
227 static void matches(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
238 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());
239
250 static void starts_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::current());
262 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());
264 };
265 }
266}
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_valid class contains a collection of static methods that implement the most string asserti...
Definition string_valid.hpp:23
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())
Validates 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())
Validates that string contains an item.
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())
Validates that string starts with item.
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())
Validates that matches regex pattern.
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())
Validates that two type are equal ignoring case.
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())
Validates that two type are equal ignoring case.
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())
Validates 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())
Validates that string contains an item.
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())
Validates 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())
Validates 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())
Validates that two type are not equal ignoring case.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that matches 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())
Validates that string starts with item.
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())
Validates that does not match 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())
Validates that string starts with item.
static void contains(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates 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())
Validates that two type are not equal ignoring case.
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())
Validates 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())
Validates that does not match regex pattern.
static void starts_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame=xtd::diagnostics::stack_frame::current())
Validates that string starts with 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::string_assert class.
Contains xtd::tunit::valid class.