public void Map_Null_Test()
        {
            IndoorDistributionExcel info = null;
            var stat = info.MapTo <IndoorDistribution>();

            Assert.IsNull(stat);
        }
        public void Map_Name_Test()
        {
            var info = new IndoorDistributionExcel {
                Name = "abc123"
            };
            var stat = info.MapTo <IndoorDistribution>();

            Assert.IsNotNull(stat);
            stat.Name.ShouldBe("abc123");
        }
Exemplo n.º 3
0
        public void Map_SourceType_Test()
        {
            var info = new IndoorDistributionExcel {
                SourceType = "type 1"
            };
            var stat = info.MapTo <IndoorDistribution>();

            Assert.IsNotNull(stat);
            stat.SourceType.ShouldBe("type 1");
        }
        public void TestConstructor(string name, double longtitute, double lattitute)
        {
            var info = new IndoorDistributionExcel
            {
                Name       = name,
                Range      = "range",
                SourceName = "source",
                SourceType = "type",
                Longtitute = longtitute,
                Lattitute  = lattitute
            };
            var item = IndoorDistribution.ConstructItem(info);

            Assert.AreEqual(item.Name, name);
            Assert.AreEqual(item.Range, "range");
            Assert.AreEqual(item.SourceName, "source");
            Assert.AreEqual(item.SourceType, "type");
        }
Exemplo n.º 5
0
 public DistributionSystem Match(IndoorDistributionExcel stat)
 {
     return(FirstOrDefault(x => x.Name == stat.Name));
 }
Exemplo n.º 6
0
 public IndoorDistribution Match(IndoorDistributionExcel stat)
 {
     return(FirstOrDefault(x => x.IndoorSerialNum == stat.IndoorSerialNum));
 }