Catcher.Lib.Test.UserDALTest.get_a_user_by_invalid_id_should_throw_exception C# (CSharp) Method

get_a_user_by_invalid_id_should_throw_exception() private method

private get_a_user_by_invalid_id_should_throw_exception ( ) : void
return void
        public void get_a_user_by_invalid_id_should_throw_exception()
        {
            var fakeObject = new Mock<IUserDAL>();

            fakeObject.Setup(x => x.GetUser(It.IsAny<int>())).Throws(new NullReferenceException());

            Assert.Throws<NullReferenceException>(()=> fakeObject.Object.GetUser(4));
        }