Skip to content

test: Refactor DirectConnectTest for readability and consistency #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

Dor-bl
Copy link
Collaborator

@Dor-bl Dor-bl commented Feb 15, 2025

OpenQA.Selenium.Response class will be deprecated in selenium 4.30
I've updated the code under test/integration/ServerTests/DirectConnectTest.cs to follow the New Response ctor.

Refactored DirectConnectTest class to improve code readability and consistency. Updated test methods to use modern C# features such as inline variable declarations, collection initializers, and object initializers. Added a new test method WithMissingDirectConnectHost to cover the missing directConnectHost scenario.

List of changes

Please provide a briefly described change list that you are going to propose.

Types of changes

What types of changes are you proposing/introducing to the .NET client?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality or value)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • Test fix (non-breaking change that improves test stability or correctness)

Documentation

  • Have you proposed a file change/ PR with Appium to update documentation?

This can be done by navigating to the documentation section on http://appium.io selecting the appropriate command/endpoint and clicking the 'Edit this doc' link to update the C# example

Integration tests

  • Have you provided integration tests for your changes? (required for Bugfix, New feature, or Test fix)

Details

Please provide more details about changes if necessary. You can provide code samples showing how they work and possible use cases if there are new features. Also, you can create gists with pasted C# code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub

Refactored `DirectConnectTest` class to improve code readability and consistency. Updated test methods to use modern C# features such as inline variable declarations, collection initializers, and object initializers. Added a new test method `WithMissingDirectConnectHost` to cover missing `directConnectHost` scenario.
@Dor-bl
Copy link
Collaborator Author

Dor-bl commented Feb 15, 2025

@nvborisenko FYI

@Dor-bl Dor-bl merged commit e8d5eaf into appium:main Feb 17, 2025
3 checks passed
@Dor-bl Dor-bl deleted the direct_connect_430 branch February 17, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants