public bool Equals(CreateIntegrationItemAction other) { if (other == null) { return(false); } if (other.SharepointItem == null) { return(this.SharepointItem == null); } return(other.SharepointItem.GUID == this.SharepointItem.GUID); }
public void should_be_not_successsfull_if_pipeline_throw_exception() { // Arrange using (new PipelinesHandler().ThrowInPipeline(PipelineNames.CreateIntegrationItem)) { var synchContext = new SynchContext(new ItemMock().AsConfigurationItem()); var action = new CreateIntegrationItemAction(TestHelper.CreateSharepointItem(), synchContext, ProcessIntegrationItemsOptions.DefaultOptions); // Act action.Execute(); // Assert action.IsSuccessful.Should().BeFalse(); } }
public void should_call_pipeline() { // Arrange using (var pipelines = new PipelinesHandler()) { var synchContext = new SynchContext(new ItemMock().AsConfigurationItem()); var sharepointItem = TestHelper.CreateSharepointItem(); var action = new CreateIntegrationItemAction(sharepointItem, synchContext, ProcessIntegrationItemsOptions.DefaultOptions); // Act action.Execute(); action.IsSuccessful.Should().BeTrue(); // Assert pipelines.ShouldReceiveCall <ProcessIntegrationItemArgs>( PipelineNames.CreateIntegrationItem, x => x.SourceSharepointItem == sharepointItem && x.SynchContext == synchContext); } }