Exemplo n.º 1
0
 public void get_all_remain_hoursTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.GetAllSprintRemainHours();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 2
0
 public void add_programmer_expected_work_hoursTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 0;
     int actual;
     actual = target.add_programmer_expected_work_hours(6,4);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 3
0
 public void DateGetDayStatusTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 1; // TODO: Initialize to an appropriate value
     int actual;
     DateTime day = DateTime.Parse("20.01.2013");
     actual = target.DateGetDayStatus(day);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 4
0
 public void Dateadd_new_dayTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     DateTime day = DateTime.Today;
     int status = 1;
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.DateAddNewDay(day, status);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 5
0
 public void get_all_sprint_daysTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     DateTime[] expected = new DateTime[4]; // TODO: Initialize to an appropriate value
     expected[0] = DateTime.Parse("01.12.2012");
     expected[1] = DateTime.Parse("02.12.2012");
     expected[2] = DateTime.Parse("03.12.2012");
     expected[3] = DateTime.Parse("20.01.2013");
     DateTime[] actual;
     actual = target.GetAllSprintDays();
     CollectionAssert.AreEqual(expected, actual);
        // Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 6
0
        private void ProgrammerToDB()
        {
            if (!IfProgrammerGreedChanged())
                return;

            DataManager dm = new DataManager();
            MathManager mm = new MathManager();
            int col = 3;
            int rows = programmerDataGridView.Rows.Count;
            string[] read = new string[col];
            for (int i = 0; i < rows - 1; i++)
            {
                for (int j = 0; j < col; j++)
                {
                    read[j] = programmerDataGridView.Rows[i].Cells[j + 1].Value.ToString();
                }
                /*for (int j = 0; j < col; j++)
                {
                    if (j == 2)
                        continue; // description might be null
                    if (read[j] == null)
                        return;
                }*/
                int programmer_ID = Convert.ToInt32(programmerDataGridView.Rows[i].Cells[0].Value.ToString());
                if (mm.isProgrammer_Id_Exist(programmer_ID) >= 0)
                { // task already exist, therefore we need only to update
                    if (mm.isProgrammerNameValid(read[0]) == true)
                    {
                        dm.ProgrammerUpdateProgrammerName(programmer_ID, read[0]);
                    }
                    else
                    {
                        MessageBox.Show("Invalid programmer name at line:" + (i + 1));
                        return;
                    }

                    dm.ProgrammerUpdateProgrammerExpectedWorkHours(programmer_ID,Convert.ToDouble(read[1]));
                    dm.ProgrammerUpdateProgrammerCurrentWorkHours(programmer_ID, Convert.ToDouble(read[2]));
                }
                else
                {
                    int ans = dm.ProgrammerAddNewProgrammer(read[0], Convert.ToInt32(read[1]), Convert.ToInt32(read[2]));
                    if (ans == -1)
                    {
                        MessageBox.Show("Error adding new programmer");
                        return;
                    }
                }
            }
        }
Exemplo n.º 7
0
 public void SprintGetAllWorkingDaysTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     DateTime[] expected = new DateTime[3]; // TODO: Initialize to an appropriate value
     expected[0] = DateTime.Parse("1.12.12");
     expected[1] = DateTime.Parse("3.12.12");
     expected[2] = DateTime.Parse("20.1.13");
     DateTime[] actual;
     actual = target.SprintGetAllWorkingDays();
     CollectionAssert.AreEqual(expected, actual);
 }
Exemplo n.º 8
0
 public void StorySetStoryDescriptionTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 0;
     int actual;
     actual = target.StorySetStoryDescription(3, "hz");
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 9
0
 public void Taskadd_new_taskTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     // int ID = 0; // TODO: Initialize to an appropriate value
     int Task_Owner = 1; // TODO: Initialize to an appropriate value
     int Story_ID = 3; // TODO: Initialize to an appropriate value
     string Description = " "; // TODO: Initialize to an appropriate value
     int Priority = 2; // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.TaskAddNewTask(Story_ID, Priority, Description, Task_Owner);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 10
0
 public void WorkHoursGetProgrammerWorkHoursAllTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     float expected = 13; // TODO: Initialize to an appropriate value
     float actual;
     actual = target.WorkHoursGetProgrammerWorkHoursAll(1);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 11
0
 public void SprintGetRemainWorkingDaysTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 1; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.SprintGetRemainWorkingDays();
     Assert.AreEqual(expected, actual);
 }
Exemplo n.º 12
0
 public void WorkHoursAddNewDayWorkHoursTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     float expected = 0; // TODO: Initialize to an appropriate value
     float actual;
     DateTime day = DateTime.Parse("1.12.12");
     actual = target.WorkHoursAddNewDayWorkHours(6,day);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 13
0
 public void WorkHoursGetAllSprintWorkHoursTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     float[] expected = {5,2,7}; // TODO: Initialize to an appropriate value
     float[] actual;
     actual = target.WorkHoursGetAllSprintWorkHours();
     CollectionAssert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 14
0
 public void StoryGetStoriesIDForStoryOwnerTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int[] expected = {3};
     int[] actual;
     actual = target.StoryGetStoriesIDForStoryOwner(6);
     CollectionAssert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 15
0
 public void StoryGetStoryDemoDesTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     string expected = "fignia";
     string actual;
     actual = target.StoryGetStoryDemoDes(3);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 16
0
 public void Sprintget_sprint_remain_daysTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 27; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.SprintGetRemainDays();
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 17
0
 public void Storyadd_new_storyTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     // int ID = 0; // TODO: Initialize to an appropriate value
     int Story_Owner = 0; // TODO: Initialize to an appropriate value
     DateTime Current_Sprint = DateTime.Parse("01.12.2012"); ; // TODO: Initialize to an appropriate value
     int Work_Status = 0; // TODO: Initialize to an appropriate value
     int Priority = 0; // TODO: Initialize to an appropriate value
     string Description = string.Empty; // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     string str = " ";
     Image pic = null;
     actual = target.StoryAddNewStory(Story_Owner, Current_Sprint, str, pic, Description, Priority, Work_Status);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 18
0
 public void Sprintget_sprint_beggining_dayTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     DateTime expected = DateTime.Parse("01.12.2012"); // TODO: Initialize to an appropriate value
     DateTime actual;
     actual = target.SprintGetBegginingDay();
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 19
0
 public void SprintGetNumberOfWorkHoursTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 8; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.SprintGetNumberOfWorkHours();
     Assert.AreEqual(expected, actual);
 }
Exemplo n.º 20
0
 public void Sprintget_all_sprint_work_hoursTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 8; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.SprintGetNumberOfWorkHours();
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 21
0
 public void TaskGetTaskDescriptionTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     string expected = "hz";
     string actual;
     actual = target.TaskGetTaskDescription(1);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 22
0
 public void SprintGetEndingDayTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     DateTime expected = DateTime.Parse("20.1.13"); // TODO: Initialize to an appropriate value
     DateTime actual;
     actual = target.SprintGetEndingDay();
     Assert.AreEqual(expected, actual);
 }
Exemplo n.º 23
0
 public void TaskSetTaskStoryIDTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 0;
     int actual;
     actual = target.TaskSetTaskStoryID(1,3);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 24
0
 public void StoryGetStoryWorkStatusTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 1;
     int actual;
     actual = target.StoryGetStoryWorkStatus(3);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 25
0
 public void DateGetTableLengthTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 5; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.DateGetTableLength();
     Assert.AreEqual(expected, actual);
 }
Exemplo n.º 26
0
 public void StoryInSprintGetStoryInSprintTableLengthTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     float expected = 3; // TODO: Initialize to an appropriate value
     float actual;
     actual = target.StoryInSprintGetStoryInSprintTableLength();
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 27
0
 public void WorkHoursGetAllWorkHoursForDayTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     float expected = 10; // TODO: Initialize to an appropriate value
     float actual;
     actual = target.WorkHoursGetAllWorkHoursForDay(DateTime.Parse("1.12.12"));
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 28
0
 public void StorySetCurrentSprintTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 0;
     DateTime day = DateTime.Parse("14.2.13");
     int actual;
     actual = target.StorySetCurrentSprint(3, day);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 29
0
 public void WorkHoursGetProgrammerWorkHoursForDayTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     float expected = -1; // TODO: Initialize to an appropriate value
     float actual;
     DateTime day = DateTime.Parse("20.1.13");
     actual = target.WorkHoursGetProgrammerWorkHoursForDay(1,day);
     Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 30
0
 public void SprintGetPassedAllDaysTesr()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 24; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.SprintGetPassedAllDays();
     Assert.AreEqual(expected, actual);
 }