コード例 #1
0
        public void FluentApi_BuildSource_GenericGradientWithGradients()
        {
            // Act
            var source = new GradientBuilder()
                         .AddLinearGradient(g => g
                                            .Rotate(20)
                                            .AddStops(Colors.Red, Colors.Green, Colors.Blue))
                         .BuildSource();

            // Assert
            using (new AssertionScope())
            {
                source.Should().BeOfType <GenericGradientSource>();
                source.GetGradients().Should().HaveCount(1);
            }
        }