- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.6k
 
          [dotnet] Migrate NUnit assertions to Assert.That syntax
          #14853
        
          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
  
    [dotnet] Migrate NUnit assertions to Assert.That syntax
  
  #14853
              Conversation
          PR Reviewer Guide 🔍Here are some key observations to aid the review process: 
  | 
    
          PR Code Suggestions ✨Explore these optional code suggestions: 
 
  | 
    
Assert.That syntax
      | 
           This PR is ready. Like you said, big boom.  | 
    
| 
           NP, easy to review. CI doesn't like extra whitespaces in code style.  | 
    
| 
           @nvborisenko Sorry for the whitespace! It should work now.  | 
    
| 
           Not sure how this slipped by me again. I just ran   | 
    
| 
           Turbo-scroll mode has been activated... Thank you, @RenderMichael, for this modernization!  | 
    
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Migrate NUnit assertions to
Assert.ThatsyntaxMotivation and Context
Contributes to #14852
Types of changes
Checklist
PR Type
Tests
Description
AlertsTestandChildrenFindingTestto use modern NUnit syntax.Assert.AreEqualwithAssert.Thatfor better readability and flexibility.Has.Count.EqualTo.Throws.InstanceOf.Assert.Multiplefor grouping multiple assertions.Changes walkthrough 📝
AlertsTest.cs
Migrate AlertsTest to modern NUnit syntaxdotnet/test/common/AlertsTest.cs
Assert.AreEqualtoAssert.ThatwithIs.EqualTo.Assert.Multiplefor multiple assertions.Has.Count.EqualTofor collection count assertions.Throws.InstanceOf.ChildrenFindingTest.cs
Migrate ChildrenFindingTest to modern NUnit syntaxdotnet/test/common/ChildrenFindingTest.cs
Assert.AreEqualwithAssert.ThatusingIs.EqualTo.Has.Count.EqualTofor collection assertions.Throws.InstanceOf.Assert.Multiplefor grouped assertions.