Exemplo n.º 1
0
        public void CanEnable_should_throw_exception_if_not_found()
        {
            var command = new EnableField {
                FieldId = 3
            };

            Assert.Throws <DomainObjectNotFoundException>(() => GuardSchemaField.CanEnable(schema_0, command));
        }
Exemplo n.º 2
0
        public void CanEnable_should_throw_exception_if_already_enabled()
        {
            var command = new EnableField {
                FieldId = 1
            };

            Assert.Throws <DomainException>(() => GuardSchemaField.CanEnable(schema_0, command));
        }
Exemplo n.º 3
0
        public void CanEnable_should_not_throw_exception_if_disabled()
        {
            var command = new EnableField {
                FieldId = 1
            };

            var schema_1 = schema_0.DisableField(1);

            GuardSchemaField.CanEnable(schema_1, command);
        }