Ejemplo n.º 1
0
 public void Should_throw_exception_if_field_to_enable_not_found()
 {
     Assert.Throws <DomainObjectNotFoundException>(() => SchemaFieldGuard.GuardCanEnable(schema, 3));
 }
Ejemplo n.º 2
0
        public void Should_not_throw_exception_if_field_to_enable_disabled()
        {
            schema = schema.DisableField(1);

            SchemaFieldGuard.GuardCanEnable(schema, 1);
        }
Ejemplo n.º 3
0
        public void Should_not_throw_exception_if_field_to_show_hidden()
        {
            schema = schema.HideField(1);

            SchemaFieldGuard.GuardCanShow(schema, 1);
        }
Ejemplo n.º 4
0
 public void Should_throw_exception_if_field_to_enable_already_enabled()
 {
     Assert.Throws <DomainException>(() => SchemaFieldGuard.GuardCanEnable(schema, 1));
 }
Ejemplo n.º 5
0
 public void Should_not_throw_exception_if_field_to_disable_shown()
 {
     SchemaFieldGuard.GuardCanDisable(schema, 1);
 }
Ejemplo n.º 6
0
 public void Should_throw_exception_if_field_to_show_already_shown()
 {
     Assert.Throws <DomainException>(() => SchemaFieldGuard.GuardCanShow(schema, 1));
 }
Ejemplo n.º 7
0
 public void Should_not_throw_exception_if_field_to_hide_shown()
 {
     SchemaFieldGuard.GuardCanHide(schema, 1);
 }
Ejemplo n.º 8
0
        public void Should_throw_exception_if_field_to_disable_already_disabled()
        {
            schema = schema.DisableField(1);

            Assert.Throws <DomainException>(() => SchemaFieldGuard.GuardCanDisable(schema, 1));
        }
Ejemplo n.º 9
0
 public void Should_not_throw_exception_if_field_to_add_not_exists()
 {
     SchemaFieldGuard.GuardCanAdd(schema, "field3");
 }
Ejemplo n.º 10
0
        public void Should_throw_exception_if_field_to_hide_already_hidden()
        {
            schema = schema.HideField(1);

            Assert.Throws <DomainException>(() => SchemaFieldGuard.GuardCanHide(schema, 1));
        }
Ejemplo n.º 11
0
 public void Should_throw_exception_if_field_to_add_already_exists()
 {
     Assert.Throws <ValidationException>(() => SchemaFieldGuard.GuardCanAdd(schema, "field1"));
 }
Ejemplo n.º 12
0
 public void Should_throw_exception_if_field_to_delete_not_locked()
 {
     SchemaFieldGuard.GuardCanDelete(schema, 1);
 }
Ejemplo n.º 13
0
        public void Should_throw_exception_if_field_to_update_is_locked()
        {
            schema = schema.LockField(1);

            Assert.Throws <DomainException>(() => SchemaFieldGuard.GuardCanUpdate(schema, 1));
        }
Ejemplo n.º 14
0
 public void Should_not_throw_exception_if_field_to_lock_not_locked()
 {
     SchemaFieldGuard.GuardCanLock(schema, 1);
 }
Ejemplo n.º 15
0
        public void Should_throw_exception_if_field_to_lock_already_locked()
        {
            schema = schema.LockField(1);

            Assert.Throws <DomainException>(() => SchemaFieldGuard.GuardCanLock(schema, 1));
        }