public void TestResetDtoGenericActionsDtoOutNotInBad()
        {
            //SETUP
            var service = new ActionService <IBizActionInOut>(_emptyDbContext, new BizActionInOut(), _mapper, _noCachingConfig);
            var data    = new ServiceLayerBizOutDto();

            //ATTEMPT
            var ex = Assert.Throws <InvalidOperationException>(() => service.ResetDto(data));

            //VERIFY
            ex.Message.ShouldEqual("Indirect copy to biz action. from type = ServiceLayerBizOutDto, to type BizDataIn. Expected a DTO of type GenericActionToBizDto<BizDataIn,ServiceLayerBizOutDto>");
        }
Exemplo n.º 2
0
        public async Task TestResetDtoGenericActionsDtoOutNotInBad()
        {
            //SETUP
            var service = new ActionServiceAsync <IBizActionInOutAsync>(_emptyDbContext, new BizActionInOutAsync(), _wrappedConfig);
            var data    = new ServiceLayerBizOutDto();

            //ATTEMPT
            var ex = await Assert.ThrowsAsync <InvalidOperationException>(async() => await service.ResetDtoAsync(data));

            //VERIFY
            ex.Message.ShouldEqual("Indirect copy to biz action. from type = ServiceLayerBizOutDto, to type BizDataIn. Expected a DTO of type GenericActionToBizDto<BizDataIn,ServiceLayerBizOutDto>");
        }