Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit 1031549

Browse files
author
Caitlin Bales (MSFT)
committed
Remove hard-coded email address
1 parent 61c61a7 commit 1031549

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

graphsdk/src/androidTest/java/com/microsoft/graph/functional/OutlookTests.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.microsoft.graph.extensions.*;
88

99
import org.junit.Assert;
10+
import org.junit.Test;
1011

1112
import javax.xml.datatype.DatatypeFactory;
1213
import javax.xml.datatype.Duration;
@@ -39,12 +40,24 @@ public void testSendMail() {
3940
testBase.graphClient.getMe().getSendMail(message, true).buildRequest().post();
4041
}
4142

43+
@Test
4244
public void testGetFindMeetingTimes() {
4345
TestBase testBase = new TestBase();
46+
47+
// Get the first user in the tenant
48+
User me = testBase.graphClient.getMe().buildRequest().get();
49+
IUserCollectionPage users = testBase.graphClient.getUsers().buildRequest().get();
50+
User tenantUser = users.getCurrentPage().get(0);
51+
52+
//Ensure that the user grabbed is not the logged-in user
53+
if (tenantUser.mail.equals(me.mail)) {
54+
tenantUser = users.getCurrentPage().get(1);
55+
}
56+
4457
List<AttendeeBase> attendees = new ArrayList<>();
4558
AttendeeBase attendeeBase = new AttendeeBase();
4659
EmailAddress email = new EmailAddress();
47-
email.address = "[email protected]";
60+
email.address = tenantUser.mail;
4861
attendeeBase.emailAddress = email;
4962
attendees.add(attendeeBase);
5063
try {

0 commit comments

Comments
 (0)