Exemplo n.º 1
0
        public void ShouldGetSignedIPromise()
        {
            const int    eventParticipantId = 1234;
            const string token    = "faketoken";
            var          mockDocs = new List <MpEventParticipantDocument>
            {
                new MpEventParticipantDocument
                {
                    EventParticipantDocumentId = 1,
                    DocumentId         = 10,
                    EventParticipantId = 1234,
                    Received           = true
                },
                new MpEventParticipantDocument
                {
                    EventParticipantDocumentId = 2,
                    DocumentId         = 12,
                    EventParticipantId = 1234,
                    Received           = false
                }
            };

            _apiUserReposity.Setup(m => m.GetToken()).Returns(token);
            _configurationWrapper.Setup(m => m.GetConfigIntValue("IPromiseDocumentId")).Returns(10);
            _tripRepository.Setup(m => m.GetTripDocuments(eventParticipantId, token)).Returns(mockDocs);

            var result = _fixture.GetIPromise(eventParticipantId);

            Assert.IsTrue(result);
        }