Ejemplo n.º 1
0
        public void NumOfPatientWithSameMutationTest()
        {
            int result   = MainBL.getNumOfPatientWithSameMutation("0");
            int expected = 0;

            Assert.AreEqual(expected, result);
        }
Ejemplo n.º 2
0
 //Initialize the table with the details from the mutation list.
 public void initTable(List <Mutation> mutationList)
 {
     _mutationList = mutationList;
     if (_mutationList != null)
     {
         foreach (Mutation m in _mutationList)
         {
             DataGridViewRow tempRow = new DataGridViewRow();
             tempRow.CreateCells(mutationDataGridView);
             tempRow.Cells[0].Value  = m.Chrom;
             tempRow.Cells[1].Value  = m.Position;
             tempRow.Cells[2].Value  = m.GeneName;
             tempRow.Cells[3].Value  = m.Ref;
             tempRow.Cells[4].Value  = m.Var;
             tempRow.Cells[5].Value  = m.Strand;
             tempRow.Cells[6].Value  = m.RefCodon;
             tempRow.Cells[7].Value  = m.VarCodon;
             tempRow.Cells[8].Value  = m.RefAA;
             tempRow.Cells[9].Value  = m.VarAA;
             tempRow.Cells[10].Value = m.PMutationName;
             tempRow.Cells[11].Value = m.CMutationName;
             tempRow.Cells[12].Value = m.CosmicName;
             tempRow.Cells[13].Value = m.NumOfShows;
             try
             {
                 int historyNum = MainBL.getNumOfPatientWithSameMutation(m.MutId);
                 if (historyNum == 0)
                 {
                     tempRow.Cells[14] = new DataGridViewTextBoxCell();
                 }
                 tempRow.Cells[14].Value = historyNum;
                 if (!m.CosmicName.Equals("-----"))
                 {
                     tempRow.DefaultCellStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#ABCDEF");
                 }
                 mutationDataGridView.Rows.Add(tempRow);
                 mutationDataGridView.PerformLayout();
             }
             catch (Exception)
             {
                 GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");
             }
         }
     }
 }