예제 #1
0
        public void should_throw_exception_if_userId_not_provided()
        {
            var cmd = new SetArtistBioVisibility {
                IsVisible = true
            };

            Assert.That(() => Repository.Execute(cmd),
                        Throws.TypeOf <DomainException>().With.Message.EqualTo("userId is required"));
        }
예제 #2
0
        public void should_throw_exception_if_bio_not_found()
        {
            var cmd = new SetArtistBioVisibility {
                UserId = "fake", IsVisible = true
            };

            Assert.That(() => Repository.Execute(cmd),
                        Throws.TypeOf <DomainException>().With.Message.EqualTo("Artist bio for user 'fake' could not be found"));
        }