public void Toggle_EmptyValues_Without_CustomValues()
        {
            var sut = new NZazuImageViewerField(new FieldDefinition
            {
                Key  = "test",
                Type = "imageViewer"
            }, ServiceLocator);

            sut.Definition.Settings.Add("AllowNullValues", "false");
            sut.Definition.Settings.Add("AllowCustomValues", "false");
            sut.SetValue(null);

            sut.GetValue().Should().Be(null);

            // lets toggle a bit
            sut.ToggleValues();
            sut.GetValue().Should().Be(null);
            sut.ToggleValues();
            sut.GetValue().Should().Be(null);

            sut.Definition.Settings["AllowNullValues"] = "true";
            sut.ToggleValues();
            sut.GetValue().Should().Be(null);
            sut.ToggleValues();
            sut.GetValue().Should().Be(null);
            sut.ToggleValues();
            sut.GetValue().Should().Be(null);
        }
        public void Toggle_Values_With_Custom_Values(string initValue, string toggleStartValue)
        {
            var sut = new NZazuImageViewerField(new FieldDefinition
            {
                Key    = "test",
                Type   = "imageViewer",
                Values = new[] { @"http://img/1.jpg", @"http://img/2.jpg", @"http://img/3.jpg" }
            }, ServiceLocator);

            sut.Definition.Settings.Add("AllowNullValues", "false");
            sut.Definition.Settings.Add("AllowCustomValues", "true");
            sut.SetValue(initValue);

            sut.GetValue().Should().Be(toggleStartValue);

            // lets toggle a bit
            sut.ToggleValues();
            sut.GetValue().Should().Be(@"http://img/1.jpg");
            sut.ToggleValues();
            sut.GetValue().Should().Be(@"http://img/2.jpg");
            sut.ToggleValues();
            sut.GetValue().Should().Be(@"http://img/3.jpg");
            sut.ToggleValues();
            sut.GetValue().Should().Be(toggleStartValue);
        }
        //[Ignore("skip for now")]
        public void Be_Creatable()
        {
            var sut = new NZazuImageViewerField(new FieldDefinition {
                Key = "test", Type = "imageViewer"
            },
                                                ServiceLocator);

            sut.Key.Should().Be("test");
            sut.ValueControl.Should().BeAssignableTo <ContentControl>();
            sut.IsEditable.Should().BeTrue();

            sut.Definition.Settings.Add("AllowCustomValues", "true"); // so heise.de works

            const string value = "http://heise.de";

            sut.SetValue(value);
            sut.GetValue().Should().Be(value);
        }