コード例 #1
0
        public void ProcessHostStarted_UpdatesOrCreatesFunctionIndexVersionIfLatest()
        {
            // Arrange
            DateTimeOffset expectedVersion = DateTimeOffset.Now;
            FakeFunctionIndexVersionManager functionIndexVersionManager = new FakeFunctionIndexVersionManager();
            IHostIndexer product = CreateProductUnderTest(functionIndexVersionManager);
            HostStartedMessage message = new HostStartedMessage
            {
                EnqueuedOn = expectedVersion
            };

            // Act
            product.ProcessHostStarted(message);

            // Assert
            Assert.Equal(expectedVersion, functionIndexVersionManager.Current);
        }
コード例 #2
0
        public void ProcessHostStarted_UpdatesOrCreatesFunctionIndexVersionIfLatest()
        {
            // Arrange
            DateTimeOffset expectedVersion = DateTimeOffset.Now;
            FakeFunctionIndexVersionManager functionIndexVersionManager = new FakeFunctionIndexVersionManager();
            IHostIndexer       product = CreateProductUnderTest(functionIndexVersionManager);
            HostStartedMessage message = new HostStartedMessage
            {
                EnqueuedOn = expectedVersion
            };

            // Act
            product.ProcessHostStarted(message);

            // Assert
            Assert.Equal(expectedVersion, functionIndexVersionManager.Current);
        }