// this is a STATIC method, "public" has been added for this example
 //static void Main()
 public static void Main()
 {
     // GetEvenNumbers is an instance method, so a instance of the Program16
     // class must be instantied to invoke the method
     Program16 p = new Program16();
     p.GetEvenNumbers(12);
     Console.WriteLine("---------");
     Program16.GetEvenNumbers2();  // can also use just GetEvenNumbers2();
     Console.WriteLine("---------");
     Console.WriteLine("Add Numbers: {0}", p.AddNumbers(4, 4));
 }
Beispiel #2
0
        public void GetFibbonaciSeries_ShouldReturnCorrectSeries1()
        {
            uint       input    = 5;
            List <int> expected = new List <int>()
            {
                0, 1, 1, 2, 4
            };

            var actual = Program16.GetFibbonaciSeries(input);

            Assert.Equal(expected, actual);
        }
Beispiel #3
0
 public void Test_Foobar()
 {
     Assert.Equal("Baz", Program16.value(100));
     Assert.Equal("Foo", Program16.value(25));
     Assert.Equal("Bar", Program16.value(40));
 }