Ejemplo n.º 1
0
        public async Task GetAdminTypeId_TypeNameString_ReturnsAdminTypeId()
        {
            // Arrange
            string TypeName = "Admin";

            _regionAdministrationService.Setup(x => x.GetAdminType(TypeName)).ReturnsAsync(2);
            // Act
            var result = await _regionController.GetAdminTypeId(TypeName);

            // Assert

            Assert.AreEqual(result, 2);
        }
        public async Task GetAdminTypeId_TypeNameString_ReturnsAdminTypeId()
        {
            // Arrange
            string TypeName = Roles.Admin;

            _regionAdministrationService.Setup(x => x.GetAdminType(TypeName)).ReturnsAsync(2);
            // Act
            var actual = await _regionController.GetAdminTypeId(TypeName);

            // Assert

            Assert.AreEqual(2, actual);
        }