예제 #1
0
 public void AddTest()
 {
     RoadData recordRoadData = new RoadData("Test");
     recordRoadData.AddBridge(new BridgeData(1, "Bridge"));
     Assert.AreEqual(1, recordRoadData.Bridges.Count);
     Assert.AreEqual("Bridge", recordRoadData.Bridges[0].Name);
     Assert.AreEqual(1, recordRoadData.Bridges[0].IDBR);
     recordRoadData = new RoadData("Test");
     recordRoadData.Bridges = null;
     recordRoadData.AddBridge(new BridgeData(1, "Bridge"));
     Assert.AreEqual(1, recordRoadData.Bridges.Count);
     Assert.AreEqual("Bridge", recordRoadData.Bridges[0].Name);
     Assert.AreEqual(1, recordRoadData.Bridges[0].IDBR);
 }
예제 #2
0
        public void AddTest()
        {
            RoadData recordRoadData = new RoadData("Test");

            recordRoadData.AddBridge(new BridgeData(1, "Bridge"));
            Assert.AreEqual(1, recordRoadData.Bridges.Count);
            Assert.AreEqual("Bridge", recordRoadData.Bridges[0].Name);
            Assert.AreEqual(1, recordRoadData.Bridges[0].IDBR);
            recordRoadData         = new RoadData("Test");
            recordRoadData.Bridges = null;
            recordRoadData.AddBridge(new BridgeData(1, "Bridge"));
            Assert.AreEqual(1, recordRoadData.Bridges.Count);
            Assert.AreEqual("Bridge", recordRoadData.Bridges[0].Name);
            Assert.AreEqual(1, recordRoadData.Bridges[0].IDBR);
        }