public void SignUpService_Add_User_Method_Throws_NullReference_Exception()
        {
            //Arrange
            //List<Master> requests = new List<Master>();
            User re = new User();

            re.Id = 1;
            var mockRepoReq = new Mock <ISignUpRepository>(); //mocking RequestRepository

            mockRepoReq.Setup(x => x.Add_User(It.IsAny <User>())).Throws(new NullReferenceException());
            SignUpService obj = new SignUpService(mockRepoReq.Object);
            //Act
            var exception = Record.Exception(() => obj.Add_User(It.IsAny <User>()));

            //Assert
            Assert.IsType <NullReferenceException>(exception);
        }
        public void SignUpService_Add_User_Method_Throws_Format_Exception()
        {
            //Arrange
            //List<Master> requests = new List<Master>();
            User re = new User();

            re.Id    = 1;
            re.Email = "*****@*****.**";
            var mockRepoReq = new Mock <ISignUpRepository>(); //mocking RequestRepository

            mockRepoReq.Setup(x => x.Add_User(re)).Throws(new FormatException());
            SignUpService obj = new SignUpService(mockRepoReq.Object);
            //Act
            var exception = Record.Exception(() => obj.Add_User(re));

            //Assert
            Assert.IsType <FormatException>(exception);
        }