コード例 #1
0
        public void CanShow_should_throw_exception_if_ui_field()
        {
            var command = new ShowField {
                FieldId = 4
            };

            Assert.Throws <DomainException>(() => GuardSchemaField.CanShow(command, schema_0));
        }
コード例 #2
0
        public void CanShow_should_throw_exception_if_already_visible()
        {
            var command = new ShowField {
                FieldId = 4
            };

            Assert.Throws <DomainException>(() => GuardSchemaField.CanShow(schema_0, command));
        }
コード例 #3
0
        public void CanShow_should_throw_exception_if_not_found()
        {
            var command = new ShowField {
                FieldId = 3
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanShow(schema_0, command));
        }
コード例 #4
0
        public void CanShow_should_throw_exception_if_locked()
        {
            var command = new ShowField {
                FieldId = 1
            };

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

            Assert.Throws <DomainException>(() => GuardSchemaField.CanShow(command, schema_1));
        }
コード例 #5
0
        public void CanShow_should_not_throw_exception_if_hidden()
        {
            var command = new ShowField {
                FieldId = 1
            };

            var schema_1 = schema_0.HideField(1);

            GuardSchemaField.CanShow(schema_1, command);
        }