public void Scan3Test() { DNASequence sequence = new DNASequence(givenTest); Scan3 scantest = new Scan3(sequence); scantest.RunScan(); AbsoluteNumberResult tr = (AbsoluteNumberResult)scantest.getScanResult(); Console.WriteLine(scantest.getQuestion()); Console.WriteLine(tr.getAnswer()); System.Collections.Generic.Dictionary<string, int> values = tr.getValues(); foreach (string s in values.Keys) { Console.WriteLine(s + " " + values[s]); } sequence = new DNASequence("ggg ac gg tcagggg"); scantest = new Scan3(sequence); scantest.RunScan(); tr = (AbsoluteNumberResult)scantest.getScanResult(); Console.WriteLine(tr.getAnswer()); values = tr.getValues(); foreach (string s in values.Keys) { Console.WriteLine(s + " " + values[s]); } }
public void DNASequenceResultTest() { string test = "1"; DNASequence seq = new DNASequence("act"); DNASequenceResult result = new DNASequenceResult(test, seq); Assert.AreEqual(result.getAnswer(),test); Assert.AreEqual<DNASequence>(result.getSequence(), seq); }
public DNATabPage(DNASequence inputSequence, string tabName) { InitializeComponent(); this.Text = tabName; this.Dock = DockStyle.Fill; this.BackColor = Color.FromArgb(64, 64, 64); sequenceInThisTab = inputSequence; setUpComponents(); }
private void addDNATabPageFromSequenceToTabControl(DNASequence sequence, string name) { // Create new DNATabPage DNATabPage fileTabPage = new DNATabPage(sequence, name); styledTabControll1.TabPages.Add(fileTabPage); styledTabControll1.Visible = true; sCANSToolStripMenuItem.Visible = true; styledTabControll1.SelectedIndex = styledTabControll1.TabCount - 1; // Run all available scans for the just created tabpage runAllScansOnCurrentDNATab(); }
public void Scan4Test() { DNASequence sequence = new DNASequence(givenTest); Scan4 scantest = new Scan4(sequence); scantest.RunScan(); TextResult tr = (TextResult)scantest.getScanResult(); Console.WriteLine(scantest.getQuestion()); Console.WriteLine(tr.getAnswer()); sequence = new DNASequence("ggg ac gg tcagggg"); scantest = new Scan4(sequence); scantest.RunScan(); tr = (TextResult)scantest.getScanResult(); Console.WriteLine(tr.getAnswer()); }
public void Scan7Test() { DNASequence sequence = new DNASequence(givenTest); Scan7 scantest = new Scan7(sequence); scantest.RunScan(); DNASequenceResult tr = (DNASequenceResult)scantest.getScanResult(); Console.WriteLine(scantest.getQuestion()); Console.WriteLine(tr.getAnswer()); Console.WriteLine(tr.getSequence().getSequenceForOutput); sequence = new DNASequence("TTAC"); scantest = new Scan7(sequence); scantest.RunScan(); tr = (DNASequenceResult)scantest.getScanResult(); Console.WriteLine(tr.getAnswer()); Console.WriteLine(tr.getSequence().getSequenceForOutput); }