public void Should_throw_exception_if_membership_null() { var cmd = new ChangeRPMode { MembershipId = null, InRPMode = true }; Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message.EqualTo("MembershipID is required!")); }
public void Should_throw_exception_if_player_not_found() { var cmd = new ChangeRPMode { MembershipId = "fake", InRPMode = true }; Assert.That(() => Repository.Execute(cmd), Throws.TypeOf <DomainException>().With.Message .EqualTo("Player with MembershipID 'fake' could not be found")); }