public void CountUnResolvedCollectionOnPersistent() { var person1 = GetPerson(1); var adapter = AdapterFor(person1); var count1 = Persistor.CountField(adapter, "Relatives"); var count2 = person1.Relatives.Count(); Assert.AreEqual(count1, count2); }
public void CountEmptyCollectionOnTransient() { var person1 = CreateNewTransientPerson(); var count1 = person1.Relatives.Count(); var adapter = AdapterFor(person1); var count2 = Persistor.CountField(adapter, "Relatives"); Assert.AreEqual(count1, count2); }
public int Count(INakedObjectAdapter inObjectAdapter) => Persistor.CountField(inObjectAdapter, Id);