Beispiel #1
0
        public async Task UpdateCommonUserTest()
        {
            SetupServices();
            var MockRequest = new Mock <UpdateCommonUserRequest>();

            MockRequest.Object.Name               = new RSCD.Model.Custom.Name();
            MockRequest.Object.Password           = "";
            MockRequest.Object.PhoneNumber        = "";
            MockRequest.Object.UserCode           = "";
            MockRequest.Object.GovernmentIdNumber = "";
            MockRequest.Object.GovernmentIdType   = "";
            MockRequest.Object.UserCode           = "";
            MockRequest.Object.CurrentUserCode    = "";
            ActionResponse res = new ActionResponse(StatusCodes.Status500InternalServerError);

            var registrationController = new RegistrationController(ServiceProvider.GetRequiredService <Registration_BL>());
            //Act
            var result = await(registrationController.UpdateCommonUser(MockRequest.Object)) as ObjectResult;

            //Assert
            Assert.Equal(res.StatusCode, result.StatusCode);
        }