public void CreateSetCommand() { var fakeCommand = MockRepository.GenerateStub <IDataManagementCommand>(); _loadStateMock.Expect(mock => mock.CreateSetCommand(_endPoint, _oppositeObject)).Return(fakeCommand); _loadStateMock.Replay(); var result = _endPoint.CreateSetCommand(_oppositeObject); _loadStateMock.VerifyAllExpectations(); Assert.That(result, Is.SameAs(fakeCommand)); }
public void TouchedChangedContent() { _endPoint.CreateSetCommand(DomainObjectIDs.Computer2.GetObject <Computer> ()).Perform(); _endPoint.Touch(); var deserializedEndPoint = FlattenedSerializer.SerializeAndDeserialize(_endPoint); Assert.That(deserializedEndPoint.Definition, Is.SameAs(_endPoint.Definition)); Assert.That(deserializedEndPoint.HasBeenTouched, Is.True); Assert.That(_endPoint.OppositeObjectID, Is.EqualTo(DomainObjectIDs.Computer2)); Assert.That(_endPoint.OriginalOppositeObjectID, Is.EqualTo(DomainObjectIDs.Computer1)); }