Beispiel #1
0
        public async Task ChangeUserInfo_With_Valid_ID()
        {
            // get local.settings and add to app.config
            await LocalSettings.SetupEnvironment();

            IGraphClientWrapper graphClientWrapper = new GraphClientMock(null);
            var result = UpdateUser.ChangeUserInfo(graphClient: graphClientWrapper, Log: log, userID: "679b3ae7-2a36-4bd3-8c50-672ab22f88ca", jobTitle: null, firstName: null, lastName: null, displayName: null, businessPhones: null, streetAddress: null, department: null, city: null, province: null, postalcode: null, mobilePhone: null, country: null);

            Assert.AreEqual(null, result.Result);
        }
Beispiel #2
0
        public async Task ChangeUserInfo_Query_With_Invalid_ID()
        {
            // get local.settings and add to app.config
            await LocalSettings.SetupEnvironment();

            string errorMessage = "";
            IGraphClientWrapper graphClientWrapper = new GraphClientMock("Invalid ID");

            try{
                var result = UpdateUser.ChangeUserInfo(graphClient: graphClientWrapper, Log: log, userID: "0000-0000-000", jobTitle: null, firstName: null, lastName: null, displayName: null, businessPhones: null, streetAddress: null, department: null, city: null, province: null, postalcode: null, mobilePhone: null, country: null);
            }
            catch (Exception e)
            {
                errorMessage = e.Message;
            }

            Assert.AreEqual("Message: Invalid ID", errorMessage.Trim());
        }