Example #1
0
 public void Max4ReturnMaxNumber()
 {
     Sept21st.Max4(1, 2, 3, 4).Is(4);
     Sept21st.Max4(2, 3, 4, 1).Is(4);
     Sept21st.Max4(3, 4, 1, 2).Is(4);
     Sept21st.Max4(8, 8, 9, 9).Is(9);
     Assert.AreEqual(Sept21st.Max4(4, 5, 6, 7), 7);
 }
Example #2
0
        public void Med3ReturnsMediumNumber()
        {
            Sept21st.Med3(1, 2, 3).Is(2);
            Sept21st.Med3(2, 3, 1).Is(2);
            Sept21st.Med3(3, 1, 2).Is(2);

            Sept21st.Med3(2, 2, 3).Is(2);
            Sept21st.Med3(3, 2, 3).Is(3);
            Sept21st.Med3(3, 3, 3).Is(3);
        }
Example #3
0
 public void SumFrom1ToN()
 {
     Sept21st.Practice1_7(7);
     Sept21st.Practice1_7(10);
 }
Example #4
0
 public void _WhenWhileStatementNplusOneOut()
 {
     Sept21st.Practice1_6(7);
 }
Example #5
0
 public void Max3ReturnsMaxNumber()
 {
     Sept21st.Max3(1, 2, 3).Is(3);
     Sept21st.Max3(2, 3, 1).Is(3);
     Sept21st.Max3(2, 2, 3).Is(3);
 }
Example #6
0
 public void Min4ReturnsMinNumber()
 {
     Sept21st.Min4(1, 2, 3, 4).Is(1);
     Sept21st.Min4(2, 3, 4, 1).Is(1);
     Sept21st.Min4(2, 2, 2, 2).Is(2);
 }
Example #7
0
 public void Min3ReturnsMinNumber()
 {
     Sept21st.Min3(1, 2, 3).Is(1);
     Sept21st.Min3(2, 3, 1).Is(1);
     Sept21st.Min3(3, 2, 1).Is(1);
 }
Example #8
0
 public void Max4_2ReturnsMaxNumber()
 {
     Sept21st.Max4_2(1, 2, 3, 4).Is(4);
     Sept21st.Max4_2(2, 3, 4, 1).Is(4);
     Sept21st.Max4_2(-2, -3, -4, -1).Is(-1);
 }
Example #9
0
 public void SumWithGaussMethod()
 {
     Sept21st.Practice1_8(10).Is(55);
     Sept21st.Practice1_8(100).Is(5050);
 }