コード例 #1
0
        public void should_throw_exception_if_ItemId_not_provided()
        {
            var cmd = new UnbembedRunesOnItem();

            Assert.That(() => Repository.Execute(cmd),
                        Throws.TypeOf <DomainException>().With.Message.EqualTo("ItemId is required"));
        }
コード例 #2
0
        public void should_throw_exception_if_rune_not_found()
        {
            var cmd = new UnbembedRunesOnItem {
                ItemId = 999
            };

            Assert.That(() => Repository.Execute(cmd),
                        Throws.TypeOf <DomainException>().With.Message.EqualTo("Cannot find an item with id '999'"));
        }