public void TestShortHeaders() { CastDate currentDate = new CastDate { Time = 1484953200000 }; ReportData reportData = TestUtility.PrepareApplicationReportData("ReportGenerator", null, @".\Data\CurrentBCresults.json", "AED/applications/3/snapshots/6", "PreVersion 1.5.0 sprint 2 shot 2", "V-1.5.0_Sprint 2_2", currentDate, null, null, null, null, null, null); var component = new TechnicalDebt(); Dictionary <string, string> config = new Dictionary <string, string> { { "HEADER", "SHORT" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Name", "Value" }); expectedData.AddRange(new List <string> { "Debt", "236,648" }); expectedData.AddRange(new List <string> { "Debt Added", "1,946" }); expectedData.AddRange(new List <string> { "Debt Removed", "23,600" }); TestUtility.AssertTableContent(table, expectedData, 2, 3); }
public void AddAmountFromBalanceRecordTransactionAndUpdateLastDebitDate() { var account = new TechnicalDebt(); account.Register(50, "Some technical debt"); Assert.AreEqual(50, account.Balance); var lastTransaction = account.LastTransaction; Assert.AreEqual(50, lastTransaction.EffortManHours); var now = DateTime.Now; Assert.AreEqual(now.Date + "/" + now.Month + "/" + now.Year, account.LastTransactionDate); }
public static TaskLib.Task[] GenerateTasks(int tasksAmount) { TaskLib.Task[] tasksList = new TaskLib.Task[tasksAmount]; string title = " task type"; string description = "(Options: Bug - 1; Feature - 2; TechnicalDebt - 3)"; TaskType type; string name; string complexity; string nameTitle = "name"; string complexityTitle = "complexity"; string complexityDescription = "(value should be from 1 to 5)"; for (int i = 0; i < tasksList.Length; i++) { type = (TaskType)int.Parse(NumberValidation(GetValue(title, description))); name = GetValue(nameTitle); complexity = GetValue(complexityTitle, complexityDescription); switch (type) { case TaskType.Bug: tasksList[i] = new Bug(name, complexity); break; case TaskType.Feature: tasksList[i] = new Feature(name, complexity); break; case TaskType.TechnicalDebt: tasksList[i] = new TechnicalDebt(name, complexity); break; default: throw new Exception("Task type is not found."); } } return(tasksList); }
public void BeforeEach() { technicalDebt = new TechnicalDebt(); }