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
public void wrongChars() { WorkWithData workWithData = new WorkWithData(); workWithData.data = "a.... . .-.. .-.. --- .-- --- .-. .-.. -.."; //this String contains a wrong char Assert.AreEqual(false, workWithData.controlData()); }
public void toLessSpaces() { WorkWithData workWithData = new WorkWithData(); workWithData.data = ".... . .-.. .-.. --- .-- --- .-. .-.. -.."; //this String has 3 spaces instead of 4 Assert.AreEqual(false, workWithData.controlData()); }
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)); } }
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()); }
void Start() { contactList = WorkWithData.GetAllFriendsFromServer(); }
public static void LoadBase(string myId, string friendId) { _messages = WorkWithData.GetAllChat(myId, friendId); }