public void should_throw_exception_if_player_id_not_defined() { var cmd = new UnembedAllRunes(); Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message.EqualTo("PlayerId is required")); }
public void can_unembed_a_rune() { item1.AttachRune(rune1); item1.AttachRune(rune2); item2.AttachRune(rune3); var cmd = new UnembedAllRunes { PlayerId = player.Id }; Assert.That(Repository.Execute(cmd), Is.EqualTo("You removed the runes from 2 of your belongings.")); Assert.That(item1.Runes, Is.Empty); Assert.That(item2.Runes, Is.Empty); Assert.That(rune1.EmbeddedOnItem, Is.Null); Assert.That(rune2.EmbeddedOnItem, Is.Null); Assert.That(rune3.EmbeddedOnItem, Is.Null); }