public void LoadFromDatabaseTest()
 {
     using (var db = new DatabaseSetup(Utili.GetCurrentMethodAndClass()))
     {
         var desires = new ObservableCollection <Desire>();
         Desire.LoadFromDatabase(desires, db.ConnectionString, false);
         var subaffdes = new ObservableCollection <SubAffordanceDesire>();
         SubAffordanceDesire.LoadFromDatabase(subaffdes, db.ConnectionString, desires, false);
         subaffdes.Count.Should().BeGreaterThan(5);
         db.Cleanup();
     }
 }
示例#2
0
 public void RemoveDesire([NotNull] SubAffordanceDesire ad)
 {
     _subaff.DeleteAffordanceDesireFromDB(ad);
     _subaff.SaveToDB();
 }