Exemple #1
0
        static void Main(string[] args)
        {
            WorkWithData workWithData = new WorkWithData();
            MorseData    morsedata    = new MorseData();
            string       inputdata    = "";
            string       outputdata   = "";

            #region Übergabeparameter überprüfen
            //Sind genau 2 Argumente als Übergabeparameter gegeben?
            if (args.Length == 2)
            {
                inputdata  = args[0];
                outputdata = args[1];
            }
            else
            {
                Console.WriteLine("Programm wird beendet da zu wenige oder zu viele Argumente übergeben wurden...");
                Console.ReadKey();
                Environment.Exit(1);
            }

            //Ist der Übergabeparameter 1 ein gültiges File?
            if (File.Exists(inputdata))
            {
                workWithData.readData(inputdata);
            }
            else
            {
                Console.WriteLine("Programm wird beendet da Argument 1 kein gültiges File ist...");
                Console.ReadKey();
                Environment.Exit(1);
            }

            # endregion
Exemple #2
0
        public void wrongChars()
        {
            WorkWithData workWithData = new WorkWithData();

            workWithData.data = "a.... . .-.. .-.. ---   .-- --- .-. .-.. -.."; //this String contains a wrong char

            Assert.AreEqual(false, workWithData.controlData());
        }
Exemple #3
0
        public void toLessSpaces()
        {
            WorkWithData workWithData = new WorkWithData();

            workWithData.data = ".... . .-.. .-.. ---  .-- --- .-. .-.. -.."; //this String has 3 spaces instead of 4

            Assert.AreEqual(false, workWithData.controlData());
        }
Exemple #4
0
        public void correctData()
        {
            WorkWithData workWithData = new WorkWithData();

            workWithData.data = ".... . .-.. .-.. ---    .-- --- .-. .-.. -..";

            Assert.AreEqual(true, workWithData.controlData());
        }
 public IHttpActionResult Get()
 {
     try
     {
         data = new WorkWithData();
         return(Ok(data.GetLogs()));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Exemple #6
0
        public void organizeInput()
        {
            WorkWithData workWithData = new WorkWithData();

            workWithData.data = ".... . .-.. .-.. ---    .-- --- .-. .-.. -..";

            workWithData.organizeInput();
            ArrayList testlist = new ArrayList();

            testlist.Add(".... . .-.. .-.. ---");
            testlist.Add(".-- --- .-. .-.. -..");

            CollectionAssert.AreEqual(testlist, workWithData.splittedMessage);
        }
 public void Delete(string id)
 {
     WorkWithData.DeleteConference(id);
 }
 public void Put([FromBody] ConferenceWithoutIDModel conference, string id)
 {
     WorkWithData.UpdateConference(conference, id);
 }
 public string Post([FromBody] ConferenceWithoutIDModel conference)
 {
     return(WorkWithData.PutConference(conference));
 }
 public List <ConferenceWithoutIDModel> GetByTitle(string title)
 {
     return(WorkWithData.ConferenceByTitle(title));
 }
 public List <ConferenceWithoutIDModel> Get()
 {
     return(WorkWithData.AllConferences());
 }
Exemple #12
0
 void Start()
 {
     contactList = WorkWithData.GetAllFriendsFromServer();
 }
 public static void LoadBase(string myId, string friendId)
 {
     _messages = WorkWithData.GetAllChat(myId, friendId);
 }