public void TestENodebExcelContruction_Gateway() { mockReader.Setup(x => x.GetName(4)).Returns("IP"); mockReader.Setup(x => x.GetName(5)).Returns("网关"); mockReader.Setup(x => x.GetValue(4)).Returns("10.17.165.27"); mockReader.Setup(x => x.GetValue(5)).Returns("10.17.165.100"); eNodebExcel = new ENodebExcel(mockReader.Object); eNodebExcel.Import(); Assert.IsNotNull(eNodebExcel); Assert.AreEqual(eNodebExcel.Ip.AddressString, "10.17.165.27"); Assert.AreEqual(eNodebExcel.Gateway.AddressString, "10.17.165.100"); }
public void TestENodebExcelContruction_Gateway() { mockReader.Setup(x => x.GetName(4)).Returns("IP"); mockReader.Setup(x => x.GetName(5)).Returns("网关"); mockReader.Setup(x => x.GetValue(4)).Returns("10.17.165.27"); mockReader.Setup(x => x.GetValue(5)).Returns("10.17.165.100"); eNodebExcel = new ENodebExcel(mockReader.Object); eNodebExcel.Import(); Assert.IsNotNull(eNodebExcel); Assert.AreEqual(eNodebExcel.Ip.AddressString, "10.17.165.27"); Assert.AreEqual(eNodebExcel.Gateway.AddressString, "10.17.165.100"); }
public void TestENodebExcelConstruction_BasicParameters() { PropertyInfo[] properties = (typeof(ENodebExcel)).GetProperties(); Assert.AreEqual(properties.Length, 16); PropertyInfo property = properties.FirstOrDefault(x => x.Name == "Gateway"); Assert.IsNotNull(property); Assert.AreEqual(property.PropertyType.Name, "IpAddress"); eNodebExcel = new ENodebExcel(mockReader.Object); eNodebExcel.Import(); Assert.IsNotNull(eNodebExcel); Assert.AreEqual(eNodebExcel.CityName, "Foshan"); Assert.AreEqual(eNodebExcel.DistrictName, "Chancheng"); Assert.AreEqual(eNodebExcel.TownName, "Zumiao"); Assert.AreEqual(eNodebExcel.Name, "My Bts"); Assert.AreEqual(eNodebExcel.ENodebId, 3344); Assert.AreEqual(eNodebExcel.Longtitute, 112.123); Assert.AreEqual(eNodebExcel.Lattitute, 23.456); }
public void TestENodebExcelConstruction_BasicParameters() { PropertyInfo[] properties = (typeof(ENodebExcel)).GetProperties(); Assert.AreEqual(properties.Length, 16); PropertyInfo property = properties.FirstOrDefault(x => x.Name == "Gateway"); Assert.IsNotNull(property); Assert.AreEqual(property.PropertyType.Name, "IpAddress"); eNodebExcel = new ENodebExcel(mockReader.Object); eNodebExcel.Import(); Assert.IsNotNull(eNodebExcel); Assert.AreEqual(eNodebExcel.CityName, "Foshan"); Assert.AreEqual(eNodebExcel.DistrictName, "Chancheng"); Assert.AreEqual(eNodebExcel.TownName, "Zumiao"); Assert.AreEqual(eNodebExcel.Name, "My Bts"); Assert.AreEqual(eNodebExcel.ENodebId, 3344); Assert.AreEqual(eNodebExcel.Longtitute, 112.123); Assert.AreEqual(eNodebExcel.Lattitute, 23.456); }