-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Expand file tree
/
Copy pathResourceProviderFixture.cs
More file actions
62 lines (47 loc) · 1.82 KB
/
ResourceProviderFixture.cs
File metadata and controls
62 lines (47 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
namespace MaterialDesignColors.Wpf.Tests;
public class ResourceProviderFixture
{
[Test]
public async Task ExcludesBlack()
{
SwatchesProvider swatchesProvider = new ();
bool containsBlack = swatchesProvider.Swatches.Any(
swatch => string.Compare(swatch.Name, "Black", StringComparison.InvariantCultureIgnoreCase) == 0);
await Assert.That(containsBlack).IsFalse();
}
[Test]
public async Task IncludesGrey()
{
SwatchesProvider swatchesProvider = new ();
bool containsBlack = swatchesProvider.Swatches.Any(
swatch => string.Compare(swatch.Name, "Grey", StringComparison.InvariantCultureIgnoreCase) == 0);
await Assert.That(containsBlack).IsTrue();
}
[Test]
public async Task BrownHasNoSecondary()
{
SwatchesProvider swatchesProvider = new ();
var brownSwatch = swatchesProvider.Swatches.Single(
swatch => swatch.Name == "brown");
await Assert.That(brownSwatch.SecondaryHues).IsNotNull();
await Assert.That(brownSwatch.SecondaryHues.Count).IsEqualTo(0);
}
[Test]
public async Task BrownHasPrimaries()
{
SwatchesProvider swatchesProvider = new ();
var brownSwatch = swatchesProvider.Swatches.Single(
swatch => swatch.Name == "brown");
await Assert.That(brownSwatch.PrimaryHues).IsNotNull();
await Assert.That(brownSwatch.PrimaryHues.Count).IsEqualTo(10);
}
[Test]
public async Task IndigoHasSecondaries()
{
SwatchesProvider swatchesProvider = new ();
var brownSwatch = swatchesProvider.Swatches.Single(
swatch => swatch.Name == "indigo");
await Assert.That(brownSwatch.SecondaryHues).IsNotNull();
await Assert.That(brownSwatch.SecondaryHues.Count).IsEqualTo(4);
}
}