public void ReturnCorrectMessage_WhenCorrectParametrsArePassed() { //Arrange gettersMock.Setup(x => x.GetBoard(validTeamName, validBoardName)).Returns(boardMock.Object); componentsFactoryMock.Setup(x => x.CreateBug(validTitle, validDescription, validSteps, validPriority, validSeverity, boardMock.Object, null)).Returns(bugMock.Object); var sut = new CreateBugCommand(historyEventWriterMock.Object, componentsFactoryMock.Object, gettersMock.Object); var parameters = new List <string>() { validTitle, validDescription, string.Join(",", validSteps), validPriority.ToString(), validSeverity.ToString(), validTeamName, validBoardName }; var expectedReturn = string.Format(CommandsConsts.ObjectCreated, nameof(Bug), validTitle); //Act var actualReturn = sut.Execute(parameters); //Assert Assert.AreEqual(expectedReturn, actualReturn); }
public void Report(PriorityType level, string area, string message) { if (level >= reportLevel) { Debug.Print(area + " : " + level.ToString() + " -> " + message); } }
public void Report(PriorityType priority, string area, string message) { if (priority < reportLevel) return; var str = (area + " : " + priority.ToString() + " -> " + message); if (port.IsOpen) { byte[] buffer = Encoding.UTF8.GetBytes(str + "\r\n"); port.Write(buffer, 0, buffer.Length); } }
public void Report(PriorityType priority, string area, string message) { if (priority < reportLevel) { return; } var str = (area + " : " + priority.ToString() + " -> " + message); if (port.IsOpen) { byte[] buffer = Encoding.UTF8.GetBytes(str + "\r\n"); port.Write(buffer, 0, buffer.Length); } }
// REturns Priority as string public string GetPriorityString() { return(priority.ToString()); }
/// <summary> /// Method for converting priority object to string /// Also removes underscores /// </summary> /// <returns></returns> private string GetPriorityToString() { return(m_priority.ToString().Replace("_", " ")); }
/// <summary> /// This method converts the priority to string and /// replace all "_" with " " in the priority /// </summary> /// <returns></returns> public string GetPriorityString() { return(priority.ToString().Replace("_", " ")); }
public void Report(PriorityType level, string area, string message) { if (level >= reportLevel) Debug.Print(area + " : " + level.ToString() + " -> " + message); }