Exemple #1
0
        static void Main(string[] args)
        {
            var answer = "";

            while (answer != "yes" || answer != "Yes")
            {
                Console.WriteLine("What is your name?");
                var name = Console.ReadLine();
                Console.WriteLine("Your name is: " + name + ". Correct?");
                answer = Console.ReadLine();
                if (answer == "yes" || answer == "Yes")
                {
                    Console.WriteLine("Good for you, that is a great name " + name);
                    break;
                }
                else
                {
                    Console.WriteLine("Could not read your name, sorry");
                }
            }

            var hej = new Cartesian2DVector();
            hej.coordinateX = 1;
            hej.coordinateX = 2;

            var hej2 = new VectorCalculator();

            hej2.AddTwoVectors(hej,hej);
        }
        public void VectorCalculator_AddTwoVectors_TwoVectorAdded()
        {
            var VectorCalc = new VectorCalculator();
            var VectorA = new Cartesian2DVector(1,1);
            var VectorB = new Cartesian2DVector(2,2);
            var Vector = new Cartesian2DVector(0,0);

              // var vectorC= VectorCalc.AddTwoVectors(VectorA, VectorB);
            Assert.That(VectorA.coordinateX.Equals(VectorB.coordinateX));
               //Assert.That(VectorB.coordinateX == VectorA.coordinateX);
        }
Exemple #3
0
 public Cartesian2DVector AddTwoVectors(Cartesian2DVector VectorA, Cartesian2DVector VectorB)
 {
     return null;
 }