コード例 #1
0
        public void SlideDataThatSpecifiesEverythingShouldInflateCorrectly()
        {
            var testSubject = new _PresentationData._SlideData
            {
                bottom           = "bottom",
                middle           = "middle",
                top              = "top",
                background_color = "#01020304",
                image_stretch    = "Fill",
                text_color       = "white",
                background_image = "img.png"
            };
            var expectedSlide = new Slide(_noImages)
            {
                BackgroundColor     = Color.FromArgb(1, 2, 3, 4),
                MessageBottom       = "bottom",
                MessageTop          = "top",
                MessageCenter       = "middle",
                BackgroundFill      = Stretch.Fill,
                BackgroundImageName = "img.png"
            };

            expectedSlide.UseWhiteText();
            testSubject.ToSlide(_noImages)
            .ShouldBeEquivalentTo(expectedSlide);
        }
コード例 #2
0
        public void SlideDataThatSpecifiesNothingShouldUseDefaults()
        {
            var testSubject   = new _PresentationData._SlideData();
            var expectedSlide = new Slide(_noImages)
            {
                BackgroundColor     = Color.FromArgb(255, 0, 0, 0),
                MessageBottom       = null,
                MessageTop          = null,
                MessageCenter       = null,
                BackgroundFill      = Stretch.Uniform,
                BackgroundImageName = null
            };

            expectedSlide.UseBlackText();
            testSubject.ToSlide(_noImages)
            .ShouldBeEquivalentTo(expectedSlide);
        }