Exemple #1
0
        public override void SetUp()
        {
            base.SetUp();
            TerminalBootstrapper.ConfigureTest();
            var salesforceManagerMock = new Mock <ISalesforceManager>();

            salesforceManagerMock.Setup(x => x.Query(SalesforceObjectType.Account, It.IsAny <IList <FieldDTO> >(), It.IsAny <string>(), It.IsAny <AuthorizationToken>()))
            .Returns(Task.FromResult(new StandardTableDataCM
            {
                Table = new List <TableRowDTO>
                {
                    new TableRowDTO {
                        Row = new List <TableCellDTO> {
                            new TableCellDTO {
                                Cell = new KeyValueDTO("Id", "1")
                            }
                        }
                    }
                }
            }));
            salesforceManagerMock.Setup(x => x.PostToChatter(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <AuthorizationToken>()))
            .Returns(Task.FromResult("feedid"));
            ObjectFactory.Container.Inject(salesforceManagerMock);
            ObjectFactory.Container.Inject(salesforceManagerMock.Object);
            var hubCommunicatorMock = new Mock <IHubCommunicator>();

            ObjectFactory.Container.Inject(hubCommunicatorMock);
            ObjectFactory.Container.Inject(hubCommunicatorMock.Object);
            HealthMonitor_FixtureData.ConfigureHubToReturnEmptyPayload();
        }
Exemple #2
0
        public override void SetUp()
        {
            base.SetUp();
            var hubCommunicatorMock = new Mock <IHubCommunicator>();

            ObjectFactory.Container.Inject(hubCommunicatorMock);
            ObjectFactory.Container.Inject(hubCommunicatorMock.Object);
            HealthMonitor_FixtureData.ConfigureHubToReturnEmptyPayload();
            var slackIntegrationMock = new Mock <ISlackIntegration>();

            slackIntegrationMock.Setup(x => x.GetChannelList(It.IsAny <string>(), It.IsAny <bool>()))
            .Returns(Task.FromResult(new List <KeyValueDTO> {
                new KeyValueDTO("#channel", "1")
            }));
            ObjectFactory.Container.Inject(slackIntegrationMock);
            ObjectFactory.Container.Inject(slackIntegrationMock.Object);
            var slackEventManagerMock = new Mock <ISlackEventManager>();

            ObjectFactory.Container.Inject(slackEventManagerMock.Object);
            ObjectFactory.Container.Inject(slackEventManagerMock);
        }