示例#1
0
        public void Test_SingleItem(string name, string address, int townId, int eNodebId, string gatewayAddress,
                                    string ipAddress, bool existed)
        {
            var infos = new List <ENodebExcel>
            {
                new ENodebExcel
                {
                    Name         = name,
                    Address      = address,
                    ENodebId     = eNodebId,
                    Ip           = new IpAddress(ipAddress),
                    GatewayIp    = new IpAddress(gatewayAddress),
                    CityName     = "city-" + townId,
                    DistrictName = "district-" + townId,
                    TownName     = "town-" + townId
                }
            };

            _service.DumpNewEnodebExcels(infos);
            if (existed)
            {
                _eNodebRepository.Object.Count().ShouldBe(3);
            }
            else
            {
                _eNodebRepository.Object.Count().ShouldBe(4);
                _eNodebRepository.Object.GetAllList()[3].ShouldBe(name, address, townId, eNodebId, gatewayAddress, ipAddress);
            }
        }