public void When_Passing_Null_Parameter_To_GetJwsInformation_Then_Exception_Is_Thrown()
        {
            // ARRANGE
            InitializeFakeObjects();
            var getJwsParameter = new GetJwsParameter();

            // ACTS & ASSERTS
            Assert.ThrowsAsync <ArgumentNullException>(() => _jwsActions.GetJwsInformation(null));
            Assert.ThrowsAsync <ArgumentNullException>(() => _jwsActions.GetJwsInformation(getJwsParameter));
        }
Пример #2
0
        public async Task <JwsInformationResponse> GetJws([FromQuery] GetJwsRequest getJwsRequest)
        {
            if (getJwsRequest == null)
            {
                throw new ArgumentNullException(nameof(getJwsRequest));
            }

            var result = await _jwsActions.GetJwsInformation(getJwsRequest.ToParameter());

            return(result.ToDto());
        }