Пример #1
0
        public async Task SendReturnsExpectedSentMessage()
        {
            var expectedMessage = new SendtMelding(
                Guid.NewGuid(),
                "msgType",
                Guid.NewGuid(),
                Guid.NewGuid(),
                TimeSpan.FromDays(1));
            var sut = _fixture.WithSentMessageReturned(expectedMessage).CreateSut();

            var payload = new List <IPayload>();

            payload.Add(Mock.Of <IPayload>());

            var request = _fixture.DefaultRequest;

            var result = await sut.Send(request, payload).ConfigureAwait(false);

            result.Should().Be(expectedMessage);
        }
Пример #2
0
        public async Task SendReturnsExpectedSentMessage()
        {
            var expectedMessage = new SendtMelding(
                meldingId: Guid.NewGuid(),
                meldingType: "msgType",
                avsenderKontoId: Guid.NewGuid(),
                mottakerKontoId: Guid.NewGuid(),
                ttl: TimeSpan.FromDays(1),
                headere: null);
            var sut = _fixture.WithSentMessageReturned(expectedMessage).CreateSut();

            var payload = new List <IPayload>();

            payload.Add(Mock.Of <IPayload>());

            var request = _fixture.DefaultRequest;

            var result = await sut.Send(request, payload).ConfigureAwait(false);

            result.Should().Be(expectedMessage);
        }