Skip to content
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

Fix code style issues #3598

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MaterialDesignColors.Wpf/SwatchesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SwatchesProvider
/// <param name="assembly"></param>
public SwatchesProvider(Assembly assembly)
{
var resourcesName = assembly.GetName().Name + ".g";
string resourcesName = assembly.GetName().Name + ".g";
var manager = new ResourceManager(resourcesName, assembly);
var resourceSet = manager.GetResourceSet(CultureInfo.CurrentUICulture, true, true);
var dictionaryEntries = resourceSet?.OfType<DictionaryEntry>().ToList();
Expand Down
20 changes: 10 additions & 10 deletions tests/MaterialDesignColors.Wpf.Tests/ResourceProviderFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public class ResourceProviderFixture
[Fact]
public void ExcludesBlack()
{
var swatchesProvider = new SwatchesProvider();
SwatchesProvider swatchesProvider = new ();

var containsBlack = swatchesProvider.Swatches.Any(
bool containsBlack = swatchesProvider.Swatches.Any(
swatch => string.Compare(swatch.Name, "Black", StringComparison.InvariantCultureIgnoreCase) == 0);

containsBlack.ShouldBe(false);
Expand All @@ -19,9 +19,9 @@ public void ExcludesBlack()
[Fact]
public void IncludesGrey()
{
var swatchesProvider = new SwatchesProvider();
SwatchesProvider swatchesProvider = new ();

var containsBlack = swatchesProvider.Swatches.Any(
bool containsBlack = swatchesProvider.Swatches.Any(
swatch => string.Compare(swatch.Name, "Grey", StringComparison.InvariantCultureIgnoreCase) == 0);

containsBlack.ShouldBe(true);
Expand All @@ -30,36 +30,36 @@ public void IncludesGrey()
[Fact]
public void BrownHasNoSecondary()
{
var swatchesProvider = new SwatchesProvider();
SwatchesProvider swatchesProvider = new ();

var brownSwatch = swatchesProvider.Swatches.Single(
swatch => swatch.Name == "brown");

brownSwatch.SecondaryHues.ShouldNotBeNull();
brownSwatch.SecondaryHues.Count().ShouldBe(0);
brownSwatch.SecondaryHues.Count.ShouldBe(0);
}

[Fact]
public void BrownHasPrimaries()
{
var swatchesProvider = new SwatchesProvider();
SwatchesProvider swatchesProvider = new ();

var brownSwatch = swatchesProvider.Swatches.Single(
swatch => swatch.Name == "brown");

brownSwatch.PrimaryHues.ShouldNotBeNull();
brownSwatch.PrimaryHues.Count().ShouldBe(10);
brownSwatch.PrimaryHues.Count.ShouldBe(10);
}

[Fact]
public void IndigoHasSecondaries()
{
var swatchesProvider = new SwatchesProvider();
SwatchesProvider swatchesProvider = new ();

var brownSwatch = swatchesProvider.Swatches.Single(
swatch => swatch.Name == "indigo");

brownSwatch.SecondaryHues.ShouldNotBeNull();
brownSwatch.SecondaryHues.Count().ShouldBe(4);
brownSwatch.SecondaryHues.Count.ShouldBe(4);
}
}
Loading