public void TestExistsForCgndbKeyOrAltCgndbKeyWhenWaterbodyHasAltCgndbKey() { string altCgndbKey = "ABCDE"; Place place = new Place(); place.CgndbKey = altCgndbKey; place.Create(); WaterBody waterbody = new WaterBody(); waterbody.AltPlace = place; waterbody.Create(); Flush(); Assert.IsTrue(WaterBody.ExistsForCgndbKeyOrAltCgndbKey(altCgndbKey)); }
public void TestFindByCgndbKeyOrAltCgndbKeyWhenWaterbodyHasCgndbKey() { string cgndbKey = "ABCDE"; Place place = new Place(); place.CgndbKey = cgndbKey; place.Create(); WaterBody waterbody = new WaterBody(); waterbody.Place = place; waterbody.Create(); Flush(); WaterBody foundWaterbody = WaterBody.FindByCgndbKeyOrAltCgndbKey(cgndbKey); Assert.AreEqual(waterbody, foundWaterbody); Assert.AreEqual(place, foundWaterbody.Place); }