示例#1
0
        public void SpyOnDisposing()
        {
            // Arrange
            var sut = new SpyAgent();

            // Act
            sut.Dispose();

            // Assert
            Assert.True(sut.IsDisposed);
        }
示例#2
0
        public async Task SpyOnStarting()
        {
            // Arrange
            var sut = new SpyAgent();

            // Act
            await sut.Start(CancellationToken.None);

            // Assert
            Assert.True(sut.HasStarted);
        }
示例#3
0
        public void SpyOnStopping()
        {
            // Arrange
            var sut = new SpyAgent();

            // Act
            sut.Stop();

            // Assert
            Assert.True(sut.IsStopped);
        }