Beispiel #1
0
        public MappingMatcherTests()
        {
            _optionsMock = new Mock <IWireMockMiddlewareOptions>();
            _optionsMock.SetupAllProperties();
            _optionsMock.Setup(o => o.Mappings).Returns(new ConcurrentDictionary <Guid, IMapping>());
            _optionsMock.Setup(o => o.LogEntries).Returns(new ConcurrentObservableCollection <LogEntry>());
            _optionsMock.Setup(o => o.Scenarios).Returns(new ConcurrentDictionary <string, ScenarioState>());

            var loggerMock = new Mock <IWireMockLogger>();

            loggerMock.SetupAllProperties();
            loggerMock.Setup(l => l.Error(It.IsAny <string>()));
            _optionsMock.Setup(o => o.Logger).Returns(loggerMock.Object);

            _sut = new MappingMatcher(_optionsMock.Object);
        }