public void SetUp() {
            system = new ProgrammableTestSystem();
        
            Person person = new Person();
            Role role = new Role();
            role.Person = person;

            personAdapter = system.AdapterFor(person);
            roleAdapter = system.AdapterFor(role);

            adder = new PersistedObjectAdderSpy();
            algorithm = new DefaultPersistAlgorithm();

            Assert.IsFalse(roleAdapter.ResolveState.IsResolved());
            Assert.That(adder.PersistedObjects.Count, Is.EqualTo(0));

            roleAdapter.Specification.AddFacet(new PersistingCallbackFacetNull(roleAdapter.Specification));
            roleAdapter.Specification.AddFacet(new PersistedCallbackFacetNull(roleAdapter.Specification));
            roleAdapter.Specification.AddFacet(new LoadingCallbackFacetNull(roleAdapter.Specification));
            roleAdapter.Specification.AddFacet(new LoadedCallbackFacetNull(roleAdapter.Specification));
            personAdapter.Specification.AddFacet(new PersistingCallbackFacetNull(personAdapter.Specification));
            personAdapter.Specification.AddFacet(new PersistedCallbackFacetNull(personAdapter.Specification));
            personAdapter.Specification.AddFacet(new LoadingCallbackFacetNull(personAdapter.Specification));
            personAdapter.Specification.AddFacet(new LoadedCallbackFacetNull(personAdapter.Specification));
        }
        public  void SetUp() {

            // system
            dataManager = new MockDataManager();
            string xmlDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\NakedObjects\testing";

            objectStore = new XmlObjectStore(dataManager, new DummyServiceManager(), xmlDirectory);
            objectStore.Clock = (new TestClock());

            ProgrammableTestSystem system = new ProgrammableTestSystem();

            Person person = new Person();
            Role role = new Role();
            role.Person = person;

            nakedObject = system.AdapterFor(person);
  
        }