public void ShouldThrowExceptionWhenValueIsNull()
                {
                    var             testDefine = new TestDefine();
                    IMagickGeometry value      = null;

                    Assert.Throws <ArgumentNullException>("value", () => testDefine.PublicCreateDefine("test", value));
                }
                public void ShouldReturnNullWhenValueIsNull()
                {
                    var testDefine = new TestDefine();

                    var define = testDefine.PublicCreateDefine("test", (IEnumerable <string>)null);

                    Assert.Null(define);
                }
                public void ShouldReturnNullForEmptyCollection()
                {
                    var testDefine = new TestDefine();
                    var value      = Enumerable.Empty <string>();

                    var define = testDefine.PublicCreateDefine("test", value);

                    Assert.Null(define);
                }
                public void ShouldReturnTheCorrectDefine()
                {
                    var testDefine = new TestDefine();
                    var value      = "42";

                    var define = testDefine.PublicCreateDefine("test", value);

                    Assert.Equal(MagickFormat.A, define.Format);
                    Assert.Equal("test", define.Name);
                    Assert.Equal("42", define.Value);
                }
                public void ShouldReturnTheCorrectDefine()
                {
                    var testDefine = new TestDefine();
                    var geometry   = new MagickGeometry(1, 2, 3, 4);

                    var define = testDefine.PublicCreateDefine("test", geometry);

                    Assert.Equal(MagickFormat.A, define.Format);
                    Assert.Equal("test", define.Name);
                    Assert.Equal("3x4+1+2", define.Value);
                }
                public void ShouldSkipNullvalue()
                {
                    var testDefine = new TestDefine();
                    var value      = new[] { "A", null, "B" };

                    var define = testDefine.PublicCreateDefine("test", value);

                    Assert.Equal(MagickFormat.A, define.Format);
                    Assert.Equal("test", define.Name);
                    Assert.Equal("A,B", define.Value);
                }
                public void ShouldReturnTheCorrectDefine()
                {
                    var testDefine = new TestDefine();
                    var value      = new[] { Channels.Red, Channels.Green };

                    var define = testDefine.PublicCreateDefine("test", value);

                    Assert.Equal(MagickFormat.A, define.Format);
                    Assert.Equal("test", define.Name);
                    Assert.Equal("Cyan,Green", define.Value);
                }