示例#1
0
        public async Task Should_create_a_new_file_when_the_existing_file_is_full()
        {
            _sut.MaxFileSize = 1;

            await _sut.Open();

            await _sut.Enqueue("hello1");

            await _sut.Enqueue("hello2");

            Directory.GetFiles(_directory, "*.data").Length.Should().Be(3,
                                                                        "because a new file should be added each time we go over the limit");
        }
示例#2
0
        public async Task Start()
        {
            await _fileQueue.Open();

            await _tcpClient.Open(_configuration.RemoteEndPointHostName, 8335);

            _tcpClient.SetReceiver(ProcessReceivedMessage);
#pragma warning disable 4014
            DeliverQueuedMessages();
#pragma warning restore 4014
        }