protected override void ExecuteWith(IMoBiContext context) { //Remove old building block var removeCommand = new RemoveBuildingBlockCommand <T>(_oldBuildingBlock); removeCommand.Execute(context); //Update id before adding the new building block _newBuildingBlock.Id = _oldBuildingBlock.Id; //Add new building block var addCommand = new AddBuildingBlockCommand <T>(_newBuildingBlock); addCommand.Execute(context); }
protected override void Context() { _bb = A.Fake <IBuildingBlock>().WithId("ID"); sut = new AddBuildingBlockCommand <IBuildingBlock>(_bb); }