Esempio n. 1
0
        /// <summary>
        /// Creates an instance of the application
        /// </summary>
        /// <param name="application">owner application</param>
        /// <param name="ownerAssembly">owner assembly</param>
        public CommonUtils(OutlookApi.Application application, Assembly ownerAssembly) : base(application, ownerAssembly)
        {
            if (null == application)
                throw new ArgumentNullException("application");

            _ownerApplication = application;
        }
        public async Task TestApiRunNoConfig()
        {
            OutlookApi outlookApi = new OutlookApi(null);
            IEnumerable <(string, bool)> results = await outlookApi.RunAsync(graphClient).ToListAsync();

            Assert.AreEqual(3, results.Count());
        }
        public async Task TestCallSendMessage()
        {
            OutlookApi outlookApi = new OutlookApi(graphClient);
            bool       result     = await outlookApi.CallSendMessageAsync();

            Assert.IsTrue(result);
        }
        public async Task TestApiRun1()
        {
            Dictionary <string, string> config = new Dictionary <string, string>
            {
                { "API:NumberOfMethodCall", "1" }
            };

            var configuration = new ConfigurationBuilder()
                                .AddInMemoryCollection(config)
                                .Build();

            OutlookApi outlookApi = new OutlookApi(null, configuration);
            IEnumerable <(string, bool)> results = await outlookApi.RunAsync(graphClient).ToListAsync();

            Assert.AreEqual(1, results.Count());
        }
Esempio n. 5
0
 /// <summary>
 /// Creates an instance of the application
 /// </summary>
 /// <param name="application">owner application</param>
 public CommonUtils(OutlookApi.Application application) : base(application)
 {
     _ownerApplication = application;
 }