microsoftgraph / microsoftgraph/msgraph-sdk-dotnet-core

Add test support to optionally test using a signed service library

Open
#57 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Request: enhancement Status: Needs investigation
Dominant language
C#
Stars
164
Forks
65
Avg merge
38m
Merged PRs (30d)
1

Description

Some M.G.D.C.Test tests take a dependency on models in M.G service library. This is fine as long as we only need to use the non-collection models like User. Otherwise, all of the collection models and request builders take a dependency on the M.G.C which is signed.

So, we need to support tests that target M.G.C in the project, and the signed+published service library and its dependency on the signed+published M.G.C.

I think we can achieve this by adding an alias to the test reference in M.G.D.C.Test project to the M.G.C project and updating the tests to use that, and then we can add a reference to the signed+published M.G.C NuGet so we can test using the service library when it requires a reference to objects defined in M.G.C.

Another option would be to bring in the service library as a submodule, and reference it via a project via an alias.

This enables:

var deltaResponse = await deltaResponseHandler.HandleResponse<EventDeltaCollectionResponse>(hrm);
EventDeltaCollectionPage deltaResponsePage = deltaResponse.Value; 
// deltaResponse.Value[0] is a property on ICollectionPage which is in the signed M.G.C 
var body = deltaResponsePage.Value[0].Body; // Can't do this now

AB#7201

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.