xtd 0.2.0
Loading...
Searching...
No Matches
string_valid.h
Go to the documentation of this file.
1
4#pragma once
5#include "valid.h"
6#include "string_assert.h"
7
9namespace xtd {
11 namespace tunit {
23 class tunit_export_ string_valid final : private base_assert {
24 public:
26 string_valid() = delete;
28
30
40 static void are_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual);
50 static void are_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame);
60 static void are_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual, const xtd::string& message);
71 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);
72
81 static void are_not_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual);
91 static void are_not_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame);
101 static void are_not_equal_ignoring_case(const xtd::string& expected, const xtd::string& actual, const xtd::string& message);
112 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);
113
123 static void contains(const xtd::string& item, const xtd::string& string);
134 static void contains(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame);
145 static void contains(const xtd::string& item, const xtd::string& string, const xtd::string& message);
157 static void contains(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame);
158
168 static void does_not_contain(const xtd::string& item, const xtd::string& string);
179 static void does_not_contain(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame);
190 static void does_not_contain(const xtd::string& item, const xtd::string& string, const xtd::string& message);
202 static void does_not_contain(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame);
203
213 static void does_not_end_with(const xtd::string& item, const xtd::string& string);
224 static void does_not_end_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame);
235 static void does_not_end_with(const xtd::string& item, const xtd::string& string, const xtd::string& message);
247 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);
248
257 static void does_not_match(const xtd::string& regex_pattern, const xtd::string& actual);
267 static void does_not_match(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame);
277 static void does_not_match(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::string& message);
288 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);
289
299 static void does_not_start_with(const xtd::string& item, const xtd::string& string);
310 static void does_not_start_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame);
321 static void does_not_start_with(const xtd::string& item, const xtd::string& string, const xtd::string& message);
333 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);
334
344 static void ends_with(const xtd::string& item, const xtd::string& string);
355 static void ends_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame);
366 static void ends_with(const xtd::string& item, const xtd::string& string, const xtd::string& message);
378 static void ends_with(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame);
379
388 static void matches(const xtd::string& regex_pattern, const xtd::string& actual);
398 static void matches(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::diagnostics::stack_frame& stack_frame);
408 static void matches(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::string& message);
419 static void matches(const xtd::string& regex_pattern, const xtd::string& actual, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame);
420
430 static void starts_with(const xtd::string& item, const xtd::string& string);
431
442 static void starts_with(const xtd::string& item, const xtd::string& string, const xtd::diagnostics::stack_frame& stack_frame);
453 static void starts_with(const xtd::string& item, const xtd::string& string, const xtd::string& message);
465 static void starts_with(const xtd::string& item, const xtd::string& string, const xtd::string& message, const xtd::diagnostics::stack_frame& stack_frame);
467 };
468 }
469}
Represents text as a sequence of character units.
Definition basic_string.h:79
Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the c...
Definition stack_frame.h:47
The base class for assert.
Definition base_assert.h:29
The string_valid class contains a collection of static methods that implement the most string asserti...
Definition string_valid.h:23
static void does_not_match(const xtd::string &regex_pattern, const xtd::string &actual)
Validates that does not match regex pattern.
static void ends_with(const xtd::string &item, const xtd::string &string, const xtd::string &message)
Validates that string starts with 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)
Validates that does not match regex pattern.
static void contains(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
Validates that string contains an item.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame)
Validates that matches regex pattern.
static void does_not_contain(const xtd::string &item, const xtd::string &string)
Validates that string contains an item.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::string &message)
Validates that matches regex pattern.
static void are_not_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual)
Validates that two type are not equal ignoring case.
static void does_not_contain(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame)
Validates that string contains an item.
static void starts_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame)
Validates that string starts with item.
static void contains(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame)
Validates 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)
Validates that string starts with item.
static void does_not_match(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::string &message)
Validates that does not match 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)
Validates that string starts with item.
static void ends_with(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
Validates 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)
Validates that string starts with item.
static void does_not_contain(const xtd::string &item, const xtd::string &string, const xtd::string &message)
Validates that string contains an item.
static void ends_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame)
Validates that string starts with item.
static void are_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::string &message)
Validates that two type are equal ignoring case.
static void does_not_contain(const xtd::string &item, const xtd::string &string, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
Validates that string contains an item.
static void does_not_end_with(const xtd::string &item, const xtd::string &string)
Validates that string does not end with a specific item.
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)
Validates that two type are equal ignoring case.
static void are_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame)
Validates that two type are equal ignoring case.
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)
Validates that two type are not equal ignoring case.
static void starts_with(const xtd::string &item, const xtd::string &string)
Validates that string starts with a specific item.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual)
Validates that matches regex pattern.
static void starts_with(const xtd::string &item, const xtd::string &string, const xtd::string &message)
Validates that string starts with item.
static void does_not_end_with(const xtd::string &item, const xtd::string &string, const xtd::diagnostics::stack_frame &stack_frame)
Validates that string starts with item.
static void contains(const xtd::string &item, const xtd::string &string, const xtd::string &message)
Validates that string contains an item.
static void does_not_start_with(const xtd::string &item, const xtd::string &string)
Validates that string does not start with a specific item.
static void does_not_start_with(const xtd::string &item, const xtd::string &string, const xtd::string &message)
Validates that string starts with item.
static void are_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual)
Validates that two type are equal ignoring case.
static void are_not_equal_ignoring_case(const xtd::string &expected, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame)
Validates 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)
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)
Validates that two type are not equal ignoring case.
static void does_not_match(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::diagnostics::stack_frame &stack_frame)
Validates that does not match regex pattern.
static void contains(const xtd::string &item, const xtd::string &string)
Validates that string contains an item.
static void matches(const xtd::string &regex_pattern, const xtd::string &actual, const xtd::string &message, const xtd::diagnostics::stack_frame &stack_frame)
Validates that matches regex pattern.
static void ends_with(const xtd::string &item, const xtd::string &string)
Validates that string ends with a specific 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)
Validates that string starts with item.
#define tunit_export_
Define shared library export.
Definition tunit_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::tunit::string_assert class.
Contains xtd::tunit::valid class.