Exemplo n.º 1
0
        public static void BeforeFeature(IObjectContainer objectContainer, FeatureInfo featureInfo)
        {
            _ = objectContainer.AddAutoMapper(
                typeof(MappingProfile).Assembly,
                typeof(AccessTokenProfile).Assembly,
                typeof(SynchronizationProfile).Assembly,
                typeof(GroupTransactionInfoProfile).Assembly);

            objectContainer.RegisterTypeAs <MockContractValidatorService, IContractValidatorService>();
            objectContainer.RegisterInstanceAs(Mock.Of <ILoggerService>());
            objectContainer.RegisterInstanceAs <IBigMessageService>(Mock.Of <IBigMessageService>(
                                                                        service => service.SerializeMessage <IEvent>(It.IsAny <IEvent>()) == new MemoryStream()));
            var configurationServiceMock = new Mock <IConfigurationService>();

            _ = configurationServiceMock
                .Setup(m => m.GetData <long>(It.IsAny <string>()))
                .Returns <string>(s => s == "PayloadStorage:SerializedSizeThreshold" ? 1000000 : default);