Skip to content

Add BackgroundColorTo Unit Tests#195

Merged
TheCodeTraveler merged 24 commits intomainfrom
Add-BackgroundColorTo-Unit-Tests
Nov 23, 2021
Merged

Add BackgroundColorTo Unit Tests#195
TheCodeTraveler merged 24 commits intomainfrom
Add-BackgroundColorTo-Unit-Tests

Conversation

@TheCodeTraveler
Copy link
Copy Markdown
Collaborator

@TheCodeTraveler TheCodeTraveler commented Nov 22, 2021

Description

Adds Unit Tests for #88

Detailed Solution

  • Adds ColorAnimationExtensions_Test.cs
  • Adds AnimationExtensions.cs
    • Introduces EnableAnimations extension method for IView
      • e.g. myLabel.EnableAnimations()
      • Allows us to set IMauiContext on an IView that can handle animations, which is required by Microsoft.Maui.Controls.AnimationExtensions.Animate
      • Otherwise, Animation.Commit will throw ArgumentException, causing BackgroundColorTo to return false
  • Add abstract keyword to BaseTest.cs

Comment thread src/CommunityToolkit.Maui.UnitTests/Mocks/AnimationExtensions.cs Outdated
Comment thread src/CommunityToolkit.Maui.UnitTests/Mocks/AnimationExtensions.cs
bijington
bijington previously approved these changes Nov 22, 2021
Copy link
Copy Markdown
Contributor

@bijington bijington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great!

@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) November 22, 2021 23:53
@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) November 22, 2021 23:58
@TheCodeTraveler TheCodeTraveler merged commit 6c46407 into main Nov 23, 2021
@delete-merged-branch delete-merged-branch bot deleted the Add-BackgroundColorTo-Unit-Tests branch November 23, 2021 00:22
@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants