-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit tests for the new classes and methods
- Loading branch information
1 parent
f1bca0c
commit 5cc1614
Showing
3 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
tests/Microsoft.Bot.Schema.Tests/Teams/MeetingParticipantsAddedEventDetailsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright(c) Microsoft Corporation.All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Bot.Schema.Teams; | ||
using Xunit; | ||
|
||
namespace Microsoft.Bot.Schema.Tests.Teams | ||
{ | ||
public class MeetingParticipantsAddedEventDetailsTests | ||
{ | ||
[Fact] | ||
public void MeetingParticipantsAddedEventDetailsInits() | ||
{ | ||
// Arrange | ||
var meetingId = "meetingId"; | ||
var meetingJoinUrl = new Uri("http://meetingJoinUrl"); | ||
var meetingTitle = "meetingTitle"; | ||
var meetingType = "meetingType"; | ||
var participant = new TeamsChannelAccount("id", "name", "givenName", "surname", "email", "userPrincipalName"); | ||
var participantsAdded = new List<TeamsChannelAccount>() { participant }; | ||
|
||
// Act | ||
var meeting = new MeetingParticipantsAddedEventDetails(meetingId, meetingJoinUrl, meetingTitle, meetingType, participantsAdded); | ||
|
||
// Assert | ||
Assert.NotNull(meeting); | ||
Assert.IsType<MeetingParticipantsAddedEventDetails>(meeting); | ||
Assert.Equal(meetingId, meeting.Id); | ||
Assert.Equal(meetingJoinUrl, meeting.JoinUrl); | ||
Assert.Equal(meetingTitle, meeting.Title); | ||
Assert.Equal(meetingType, meeting.MeetingType); | ||
Assert.StrictEqual(participantsAdded, meeting.ParticipantsAdded); | ||
} | ||
|
||
[Fact] | ||
public void MeetingParticipantsAddedEventDetailsInitsWithNoArgs() | ||
{ | ||
// Act | ||
var meeting = new MeetingParticipantsAddedEventDetails(); | ||
|
||
// Assert | ||
Assert.NotNull(meeting); | ||
Assert.IsType<MeetingParticipantsAddedEventDetails>(meeting); | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
tests/Microsoft.Bot.Schema.Tests/Teams/MeetingParticipantsRemovedEventDetailsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Bot.Schema.Teams; | ||
using Xunit; | ||
|
||
namespace Microsoft.Bot.Schema.Tests.Teams | ||
{ | ||
public class MeetingParticipantsRemovedEventDetailsTests | ||
{ | ||
[Fact] | ||
public void MeetingParticipantsRemovedEventDetailsInits() | ||
{ | ||
// Arrange | ||
var meetingId = "meetingId"; | ||
var meetingJoinUrl = new Uri("http://meetingJoinUrl"); | ||
var meetingTitle = "meetingTitle"; | ||
var meetingType = "meetingType"; | ||
var participant = new TeamsChannelAccount("id", "name", "givenName", "surname", "email", "userPrincipalName"); | ||
var participantsRemoved = new List<TeamsChannelAccount>() { participant }; | ||
|
||
// Act | ||
var meeting = new MeetingParticipantsRemovedEventDetails(meetingId, meetingJoinUrl, meetingTitle, meetingType, participantsRemoved); | ||
|
||
// Assert | ||
Assert.NotNull(meeting); | ||
Assert.IsType<MeetingParticipantsRemovedEventDetails>(meeting); | ||
Assert.Equal(meetingId, meeting.Id); | ||
Assert.Equal(meetingJoinUrl, meeting.JoinUrl); | ||
Assert.Equal(meetingTitle, meeting.Title); | ||
Assert.Equal(meetingType, meeting.MeetingType); | ||
Assert.StrictEqual(participantsRemoved, meeting.ParticipantsRemoved); | ||
} | ||
|
||
[Fact] | ||
public void MeetingParticipantsRemovedEventDetailsInitsWithNoArgs() | ||
{ | ||
// Act | ||
var meeting = new MeetingParticipantsRemovedEventDetails(); | ||
|
||
// Assert | ||
Assert.NotNull(meeting); | ||
Assert.IsType<MeetingParticipantsRemovedEventDetails>(meeting); | ||
} | ||
} | ||
} |