Beispiel #1
0
 public async Task <bool> CreateGateway(string gatewayName, string gatewayMAC, string createdBy, int boundaryId, bool isEnable)
 {
     try
     {
         return(await Task.Run(() => _gatewayRepository.CreateGateway(gatewayName, gatewayMAC, createdBy, boundaryId, isEnable)));
     }
     catch (Exception ex)
     {
         _logger.LogError("Error" + ex.Message);
         return(false);
     }
 }
Beispiel #2
0
        public void CreateGateway()
        {
            //Arrange
            string gatewayName = "Gateway 3";
            string gatewayMAC  = "000000000003";
            string createdBy   = "Admin";
            int    boundaryId  = 1;
            bool   isEnable    = true;

            //Act
            bool status = repositry.CreateGateway(gatewayName, gatewayMAC, createdBy, boundaryId, isEnable);

            //Assert
            Assert.True(status);
        }