public void CanPersistACallToAChildRetreivedViaAMethodCall() { var db = new SourceryDb(); var cup = db.Get<CupWithEgg>("Cup123").Proxy(); Assert.False(cup.Egg.IsCracked); cup.GetTheEgg().IsCracked = true; Assert.True(cup.Egg.IsCracked); var sourcerer2 = new SourceryDb().Get<CupWithEgg>("Cup123"); Assert.True(sourcerer2.ReadModel.Egg.IsCracked); }
public void CanPersistAMethodCall() { var db = new SourceryDb(); var objectid = Guid.NewGuid().ToString(); var egg = db.Get<Egg>(objectid).Proxy(); Assert.False(egg.IsCracked); egg.CrackIt(); Assert.True(egg.IsCracked); var sourcerer2 = new SourceryDb().Get<Egg>(objectid); Assert.True(sourcerer2.ReadModel.IsCracked); }