public void ObservableMessages_MemberEstimated_ScrumTeamMemberMessage() { // Arrange var target = new AzurePlanningPokerController(); target.EndInitialization(); var messages = new List <ScrumTeamMessage>(); var teamLock = target.CreateScrumTeam("test", "master"); teamLock.Team.ScrumMaster.StartEstimation(); // Act target.ObservableMessages.Subscribe(m => messages.Add(m)); teamLock.Team.ScrumMaster.Estimation = new Estimation(3.0); target.Dispose(); // Verify Assert.AreEqual <int>(2, messages.Count); Assert.AreEqual <MessageType>(MessageType.MemberEstimated, messages[0].MessageType); Assert.AreEqual <string>("test", messages[0].TeamName); Assert.IsInstanceOfType(messages[0], typeof(ScrumTeamMemberEstimationMessage)); var memberMessage = (ScrumTeamMemberEstimationMessage)messages[0]; Assert.AreEqual <string>("master", memberMessage.MemberName); Assert.AreEqual <double?>(3.0, memberMessage.Estimation); }
public void ObservableMessages_TeamCreated_ScrumTeamCreatedMessage() { // Arrange var target = new AzurePlanningPokerController(); target.EndInitialization(); var messages = new List <ScrumTeamMessage>(); // Act target.ObservableMessages.Subscribe(m => messages.Add(m)); target.CreateScrumTeam("test", "master"); target.Dispose(); // Verify Assert.AreEqual <int>(1, messages.Count); Assert.AreEqual <MessageType>(MessageType.TeamCreated, messages[0].MessageType); Assert.AreEqual <string>("test", messages[0].TeamName); }