Exemple #1
0
        public async Task RegisterAdminUserTest()
        {
            SetupServices();
            var MockRequest = new Mock <RegisterAdminUserRequest>();

            MockRequest.Object.Name       = new RSCD.Model.Custom.Name();
            MockRequest.Object.Role       = "";
            MockRequest.Object.EmailId    = "";
            MockRequest.Object.BadgeId    = "";
            MockRequest.Object.Department = "";
            ActionResponse res = new ActionResponse(StatusCodes.Status500InternalServerError);

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

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