Beispiel #1
0
        public void CanHide_should_throw_exception_if_ui_field()
        {
            var command = new HideField {
                FieldId = 4
            };

            Assert.Throws <DomainException>(() => GuardSchemaField.CanHide(command, schema_0));
        }
Beispiel #2
0
        public void CanHide_should_throw_exception_if_not_found()
        {
            var command = new HideField {
                FieldId = 3
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanHide(schema_0, command));
        }
Beispiel #3
0
        public void CanHide_hould_not_throw_exception_if_visible()
        {
            var command = new HideField {
                FieldId = 1
            };

            GuardSchemaField.CanHide(schema_0, command);
        }
Beispiel #4
0
        public void CanHide_should_throw_exception_if_locked()
        {
            var command = new HideField {
                FieldId = 1
            };

            var schema_1 = schema_0.UpdateField(1, f => f.Lock());

            Assert.Throws <DomainException>(() => GuardSchemaField.CanHide(command, schema_1));
        }
Beispiel #5
0
        public void CanHide_should_throw_exception_if_already_hidden()
        {
            var command = new HideField {
                FieldId = 1
            };

            var schema_1 = schema_0.HideField(1);

            Assert.Throws <DomainException>(() => GuardSchemaField.CanHide(schema_1, command));
        }