Skip to content

adding unit tests for custom swatch colors#4025

Open
MovGP0 wants to merge 1 commit intoMaterialDesignInXAML:masterfrom
MovGP0:master
Open

adding unit tests for custom swatch colors#4025
MovGP0 wants to merge 1 commit intoMaterialDesignInXAML:masterfrom
MovGP0:master

Conversation

@MovGP0
Copy link
Copy Markdown
Contributor

@MovGP0 MovGP0 commented Mar 25, 2026

Motivation

For a project I needed custom swatch colors derived from ISO 3864 colors:
- Error
- Warning (High & Low)
- Info
- Success

Content of the PR

This PR adds an unit tests that shows how to implement those custom swatches

public sealed class CustomSemanticSwatchTests
{
[Test]
public async Task CustomSemanticSwatches_ExtractExpectedThemeColors()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One small thing here, rather than iterating over the bool array, I would pass them as argument.

Suggested change
public async Task CustomSemanticSwatches_ExtractExpectedThemeColors()
[Arguments(true)]
[Arguments(false)]
public async Task CustomSemanticSwatches_ExtractExpectedThemeColors(bool isDark)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants