当前位置: 首页>>代码示例>>C#>>正文


C# Place.CreateAndFlush方法代码示例

本文整理汇总了C#中Place.CreateAndFlush方法的典型用法代码示例。如果您正苦于以下问题:C# Place.CreateAndFlush方法的具体用法?C# Place.CreateAndFlush怎么用?C# Place.CreateAndFlush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Place的用法示例。


在下文中一共展示了Place.CreateAndFlush方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Setup

 public override void Setup()
 {
     base.Setup();
     mocks = new MockRepository();
     // save one entry in the database that has a place and a watershed attached
     ClosestWatershedToPlace closestWatershedToPlace = new ClosestWatershedToPlace();
     Place testPlace = new Place();
     testPlace.CgndbKey = "ABCDE";
     testPlace.CreateAndFlush();
     Watershed testWatershed = new Watershed();
     testWatershed.DrainageCode = "01-00-00-00-00-00";
     testWatershed.Place = testPlace;
     testWatershed.CreateAndFlush();
     closestWatershedToPlace.Place = testPlace;
     closestWatershedToPlace.Watershed = testWatershed;
     closestWatershedToPlace.CreateAndFlush();
 }
开发者ID:nbadw,项目名称:sjr_atlas,代码行数:17,代码来源:ClosestWatershedToPlaceTest.cs

示例2: TestBelongsToPlace

        public void TestBelongsToPlace()
        {
            string drainageCode = "01-02-03-04-05-06";
            string cgndbKey = "ABCDE";

            Place place = new Place();
            place.CgndbKey = cgndbKey;
            place.CreateAndFlush();

            Watershed watershed = new Watershed();
            watershed.DrainageCode = drainageCode;
            watershed.Place = place;
            watershed.CreateAndFlush();

            Watershed dbWatershed = Watershed.Find(drainageCode);
            Assert.IsNotNull(dbWatershed);
            Assert.IsNotNull(dbWatershed.Place);
            Assert.AreEqual(cgndbKey, dbWatershed.Place.CgndbKey);
        }
开发者ID:nbadw,项目名称:sjr_atlas,代码行数:19,代码来源:WatershedTest.cs

示例3: TestAltPlace

        public void TestAltPlace()
        {
            int id = 37;
            string cgndbKey = "ABCDE";

            Place place = new Place();
            place.CgndbKey = cgndbKey;
            place.CreateAndFlush();

            WaterBody waterbody = new WaterBody();
            waterbody.Id = id;
            waterbody.AltPlace = place;
            waterbody.CreateAndFlush();

            WaterBody dbWaterbody = WaterBody.Find(id);
            Assert.IsNotNull(dbWaterbody);
            Assert.IsNotNull(dbWaterbody.AltPlace);
            Assert.AreEqual(cgndbKey, dbWaterbody.AltPlace.CgndbKey);
        }
开发者ID:nbadw,项目名称:sjr_atlas,代码行数:19,代码来源:WaterBodyTest.cs

示例4: TestClosestWatershedToPlace

        public void TestClosestWatershedToPlace()
        {
            string cgndbKey = "ABCDE";
            Place place = new Place();
            place.CgndbKey = cgndbKey;
            place.CreateAndFlush();

            Watershed watershed = new Watershed();
            watershed.DrainageCode = "01-02-03-04-05-06";
            watershed.Place = place;
            watershed.CreateAndFlush();

            ClosestWatershedToPlace closestWatershedToPlace = new ClosestWatershedToPlace();
            closestWatershedToPlace.Place = place;
            closestWatershedToPlace.Watershed = watershed;
            closestWatershedToPlace.CreateAndFlush();

            Place dbPlace = Place.Find(cgndbKey);
            Assert.IsNotNull(dbPlace);
            Assert.AreEqual(closestWatershedToPlace, place.ClosestWatershedToPlace);
        }
开发者ID:nbadw,项目名称:sjr_atlas,代码行数:21,代码来源:PlaceTest.cs

示例5: TestRelatedInteractiveMapsNeverReturnsNull

        public void TestRelatedInteractiveMapsNeverReturnsNull()
        {
            Assert.Ignore();

            Place place = new Place();
            place.CgndbKey = "ABCDE";
            place.CreateAndFlush();
            IList<InteractiveMap> interativeMaps = place.RelatedInteractiveMaps;
            Assert.IsNotNull(interativeMaps);
            Assert.AreEqual(0, interativeMaps.Count);
        }
开发者ID:nbadw,项目名称:sjr_atlas,代码行数:11,代码来源:PlaceTest.cs


注:本文中的Place.CreateAndFlush方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。