public void should_throw_error_if_form_source_submitted_but_not_found() { var cmd = new SetSkillSourceFKs { SkillSourceId = 55, FormSourceId = 99999 }; Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message.EqualTo( "FormSource Source with id '99999' could not be found. Does it need to be published first?")); }
public void should_throw_error_if_exclusive_to_item_source_submitted_but_not_found() { var cmd = new SetSkillSourceFKs { SkillSourceId = 55, ExclusiveToItemSourceId = -999 }; Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message .EqualTo("ExclusiveToItemSource with id '-999' could not be found")); }
public void should_throw_error_if_skill_source_not_found() { var cmd = new SetSkillSourceFKs { SkillSourceId = 3457 }; Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message .EqualTo("StaticSkill Source with Id 3457 could not be found")); }
public void should_throw_error_if_gives_effect_source_submitted_but_not_found() { var cmd = new SetSkillSourceFKs { SkillSourceId = 55, GivesEffectSourceId = -999 }; Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message .EqualTo("EffectSource with Id '-999' could not be found")); }