コード例 #1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     SequenceCalculator sc = new SequenceCalculator();
     int number = 0;
     pnlOutput.Visible = true;
     if (int.TryParse(txtNumber.Text, out number))
     {
         lblS311.Text = sc.S311(number);
         lblS312.Text = sc.S312(number);
         lblS313.Text = sc.S313(number);
         lblS314.Text = sc.S314(number);
         lblS315.Text = sc.S315(number);
     }
 }
コード例 #2
0
 public void TestS311()
 {
     SequenceCalculator sc = new SequenceCalculator();
     Assert.AreEqual( sc.S311(6), "1,2,3,4,5,6");
 }