// You can play around with the code to test its functionality.
        static void Main()
        {
            Gsm gsm = new Gsm("iphone");
            Gsm gsm1 = new Gsm("iphon3");
            Gsm gsm2 = new Gsm("iphone2");

            GsmTest gsmtest = new GsmTest(new List<Gsm>() { gsm, gsm1, gsm2 });

            gsmtest.GetInfoForIPhone();
        }
Example #2
0
        static void Main()
        {
            decimal price = .37M;

            Gsm[] gsms = new Gsm[2];

            // GSM 0
            {
                gsms[0] = Gsm.IPhone4S;
            }

            // GSM 1
            {
                Display display = new Display(480, 320);
                Battery battery = new Battery(Battery.Type.LiIon);

                gsms[1] = new Gsm("iPhone 5", "Apple", display: display, battery: battery);

                gsms[1].CallHistory.Add(new Call("123", new TimeSpan(0, 1, 10))); // Hours, Minutes, Seconds
                gsms[1].CallHistory.Add(new Call("456", new TimeSpan(0, 2, 20)));
                gsms[1].CallHistory.Add(new Call("123", new TimeSpan(0, 2, 0)));
                gsms[1].CallHistory.Add(new Call("456", new TimeSpan(0, 1, 0)));
            }

            foreach (Gsm gsm in gsms)
            {
                GsmTest.Print(gsm);
            }

            CallHistoryTest callHistoryTest = new CallHistoryTest(gsms[1].CallHistory);

            callHistoryTest.GetPrice(price);

            callHistoryTest.Remove(id: 2);

            callHistoryTest.GetPrice(price);

            callHistoryTest.RemoveLongestCall();

            callHistoryTest.GetPrice(price);

            callHistoryTest.ClearHistory();
        }
Example #3
0
 static void Main()
 {
     GsmTest.RunTests();
     GsmCallHistoryTest.RunTests();
 }
Example #4
0
 private static void Main()
 {
     Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
     GsmTest.StartTest();
     GsmCallHistoryTest.StartTest();
 }
        static void Main()
        {
            GsmTest.test();

            GSMCallHistoryTest.testt();
        }