コード例 #1
0
        public void DoesNotThrowWhenRequestIsValid()
        {
            var request = new JourneyRequest
            {
                FareId    = "123abc",
                JourneyId = "DEF456"
            };

            Assert.DoesNotThrow(() => _validator.Validate(request));
        }
コード例 #2
0
        public void ThrowsWhenInvalidDataRequest(string journeyId, string fareId)
        {
            var request = new JourneyRequest
            {
                FareId    = fareId,
                JourneyId = journeyId
            };

            Assert.Throws <InvalidJourneyInformationException>(() =>
            {
                this._validator.Validate(request);
            });
        }