public GraphManagerTests(GraphManagerTestFixture fixture) { appConfig = fixture.appConfig; authProvider = fixture.authProvider; graphManager = fixture.graphManager; Debug.WriteLine(graphManager.GetHashCode()); }
public GraphManagerTestFixture() { appConfig = new ConfigurationBuilder() .AddUserSecrets <GraphManagerTests>() .Build(); AuthProvider.Initialize(appConfig); GraphManager.Initialize(AuthProvider.Instance); authProvider = AuthProvider.Instance; graphManager = GraphManager.Instance; }
// lazy singleton public static void Initialize(IAuthenticationProvider authProvider) { if (instance == null) { instance = new GraphManager(authProvider); } else { Console.WriteLine($"{typeof(GraphManager)} has already been initialized."); } }
public GraphManagerFixture() { authProvider = new AuthProvider(AuthProvider.Authority.Organizations); graphManager = new GraphManager(authProvider); var _ = authProvider.GetAccessTokenWithUsernamePassword().Result; }