Example #1
0
        public void Serialization()
        {
            var agent = new FetchedVirtualObjectRelationDataRegistrationAgent(new SerializableVirtualEndPointProviderFake());

            var deserializedInstance = Serializer.SerializeAndDeserialize(agent);

            Assert.That(deserializedInstance.VirtualEndPointProvider, Is.Not.Null);
        }
Example #2
0
        public override void SetUp()
        {
            base.SetUp();

            _loadedDataContainerProviderStub = MockRepository.GenerateStub <ILoadedDataContainerProvider> ();
            _virtualEndPointProviderMock     = MockRepository.GenerateStrictMock <IVirtualEndPointProvider> ();

            _agent = new FetchedVirtualObjectRelationDataRegistrationAgent(_virtualEndPointProviderMock);

            _originatingEmployee1 = DomainObjectMother.CreateFakeObject <Employee> (DomainObjectIDs.Employee1);
            _originatingEmployee2 = DomainObjectMother.CreateFakeObject <Employee> (DomainObjectIDs.Employee2);

            _originatingEmployeeData1 = LoadedObjectDataObjectMother.CreateLoadedObjectDataStub(_originatingEmployee1);
            _originatingEmployeeData2 = LoadedObjectDataObjectMother.CreateLoadedObjectDataStub(_originatingEmployee2);

            _fetchedComputer1 = DomainObjectMother.CreateFakeObject <Computer> (DomainObjectIDs.Computer1);
            _fetchedComputer2 = DomainObjectMother.CreateFakeObject <Computer> (DomainObjectIDs.Computer2);
            _fetchedComputer3 = DomainObjectMother.CreateFakeObject <Computer> (DomainObjectIDs.Computer3);

            _fetchedComputerData1 = CreateFetchedComputerData(_fetchedComputer1, _originatingEmployee1.ID);
            _fetchedComputerData2 = CreateFetchedComputerData(_fetchedComputer2, _originatingEmployee2.ID);
            _fetchedComputerData3 = CreateFetchedComputerData(_fetchedComputer3, DomainObjectIDs.Employee3);
        }