17 references to Color
Shared.Tests (17)
Throw\ThrowTest.cs (17)
169
Color
red =
Color
.Red;
205
Color
red =
Color
.Red;
206
Color
blue =
Color
.Blue;
399
Assert.Equal(
Color
.Red, Throw.IfOutOfRange(
Color
.Red, "foo"));
400
Assert.Equal(
Color
.Green, Throw.IfOutOfRange(
Color
.Green, "foo"));
401
Assert.Equal(
Color
.Blue, Throw.IfOutOfRange(
Color
.Blue, "foo"));
403
var exception = Assert.Throws<ArgumentOutOfRangeException>(() => Throw.IfOutOfRange((
Color
)(-1), "foo"));
407
exception = Assert.Throws<ArgumentOutOfRangeException>(() => Throw.IfOutOfRange((
Color
)3, "foo"));
415
Color
? colorButNull = null;
417
var exceptionImplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange((
Color
)colorButNull!));
418
var exceptionExplicitArgumentName = Record.Exception(() => Throw.IfOutOfRange((
Color
)colorButNull!, nameof(colorButNull)));