Exemplo n.º 1
0
 private async Task TransformObjects(List <object> items, IGraphRequestContext context, MutationActions mutationAction)
 {
     await _modelTransformerProvider.TransformAsync(new ModelTransformArguments
     {
         Models         = items,
         Action         = mutationAction,
         RequestContext = context
     });
 }
Exemplo n.º 2
0
        public async Task CanHandleNulllListTypes()
        {
            var mock1 = new MockModel1
            {
                Id = "a1",
            };

            await _modelTransformerProvider.TransformAsync(new ModelTransformArguments
            {
                Action = MutationActions.BatchCreate,
                Models = new List <object> {
                    mock1
                }
            });

            _modelTransformer.List1.Count.ShouldBe(1);
            _modelTransformer.List1.SingleOrDefault(x => x.Id == "a1").ShouldNotBeNull();
        }