Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Nov 7, 2024
1 parent b17f711 commit c56aec4
Showing 1 changed file with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3858,6 +3858,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::sock_error, e.socket_error());
assert::are_equal(enum_object {socket_error::sock_error}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3876,6 +3878,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::success, e.socket_error());
assert::are_equal(enum_object {socket_error::success}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3894,6 +3898,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::operation_aborted, e.socket_error());
assert::are_equal(enum_object {socket_error::operation_aborted}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3912,6 +3918,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::io_pending, e.socket_error());
assert::are_equal(enum_object {socket_error::io_pending}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3930,6 +3938,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::interrupted, e.socket_error());
assert::are_equal(enum_object {socket_error::interrupted}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3948,6 +3958,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::access_denied, e.socket_error());
assert::are_equal(enum_object {socket_error::access_denied}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3966,6 +3978,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::fault, e.socket_error());
assert::are_equal(enum_object {socket_error::fault}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -3984,6 +3998,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::invalid_argument, e.socket_error());
assert::are_equal(enum_object {socket_error::invalid_argument}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4002,6 +4018,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::too_many_open_sockets, e.socket_error());
assert::are_equal(enum_object {socket_error::too_many_open_sockets}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4020,6 +4038,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::would_block, e.socket_error());
assert::are_equal(enum_object {socket_error::would_block}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4039,6 +4059,8 @@ namespace xtd::net::sockets::tests {
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::are_equal(socket_error::in_progress, e.socket_error());
assert::are_equal(enum_object {socket_error::in_progress}.to_int32(), e.socket_error_code());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
assert::is_not_zero(e.get_last_stack_frame().get_file_line_number());
Expand All @@ -4056,6 +4078,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::already_in_progress, e.socket_error());
assert::are_equal(enum_object {socket_error::already_in_progress}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4074,6 +4098,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::not_socket, e.socket_error());
assert::are_equal(enum_object {socket_error::not_socket}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4092,6 +4118,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::destination_address_required, e.socket_error());
assert::are_equal(enum_object {socket_error::destination_address_required}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4110,6 +4138,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::message_size, e.socket_error());
assert::are_equal(enum_object {socket_error::message_size}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4128,6 +4158,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::protocol_type, e.socket_error());
assert::are_equal(enum_object {socket_error::protocol_type}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4146,6 +4178,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::protocol_option, e.socket_error());
assert::are_equal(enum_object {socket_error::protocol_option}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4164,6 +4198,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::protocol_not_supported, e.socket_error());
assert::are_equal(enum_object {socket_error::protocol_not_supported}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4182,6 +4218,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::socket_not_supported, e.socket_error());
assert::are_equal(enum_object {socket_error::socket_not_supported}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4200,6 +4238,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::operation_not_supported, e.socket_error());
assert::are_equal(enum_object {socket_error::operation_not_supported}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4218,6 +4258,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::protocol_family_not_supported, e.socket_error());
assert::are_equal(enum_object {socket_error::protocol_family_not_supported}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4236,6 +4278,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::address_family_not_supported, e.socket_error());
assert::are_equal(enum_object {socket_error::address_family_not_supported}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand All @@ -4254,6 +4298,8 @@ namespace xtd::net::sockets::tests {
assert::are_equal(e.h_result(), e.error_code().value());
assert::is_null(e.inner_exception());
assert::are_equal("", e.message());
assert::are_equal(socket_error::address_already_in_use, e.socket_error());
assert::are_equal(enum_object {socket_error::address_already_in_use}.to_int32(), e.socket_error_code());
assert::are_equal(path::get_file_name(assembly::get_executing_assembly().location()), e.source());
assert::is_not_empty(e.stack_trace());
assert::is_not_empty(e.get_last_stack_frame().get_file_name());
Expand Down

0 comments on commit c56aec4

Please sign in to comment.