public void NameHinzufuegenNichtLeer() { Bibliothek bn = new Bibliothek(); bn.NameHinzufuegen(""); Assert.Fail(); }
public void NameHinzufuegenTest() { Bibliothek bn = new Bibliothek(); bn.NameHinzufuegen("Sand"); Assert.AreEqual(1, bn.Liste.Count); }
public MainWindow() { InitializeComponent(); myLib = new Bibliothek(); myLib.Bestand = Datei.Laden(); lstMedien.ItemsSource = myLib.SortiertNachTyp(); myLib.Bestand.CollectionChanged += Bestand_CollectionChanged; }
public void Oeffnen() { Bibliothek bn = new Bibliothek(); bn.Oeffnen("Rechner", @"C:\Windows\System32\calc.exe", , ); Process[] p = Process.GetProcessesByName("calc"); Assert.AreNotEqual(0, p.Length); }
public void NameHinzufuegenNotNull() { Bibliothek bn = new Bibliothek(); list.Add("Sand"); bn.NameHinzufuegen(null); Assert.Fail(); }
public void NameEntfernenNichtLeer() { Bibliothek bn = new Bibliothek(); list.Add("Sand"); bn.NameEntfernen(""); Assert.Fail(); }
public void NameEntfernenTest() { Bibliothek bn = new Bibliothek(); list.Add("Sand"); bn.NameEntfernen("Sand"); Assert.AreEqual(0, bn.Liste.Count); }
// Main Methode in .Net Core akzeptiert noch kein async private static async Task MainAsync(string[] args) { Console.WriteLine("AZURE WORKSHOP"); var waitingForCommand = true; while (waitingForCommand) { // Demo auswählen var arguments = (Console.ReadLine() ?? string.Empty) .ToLower() .Split((char[])null, StringSplitOptions.RemoveEmptyEntries); if (arguments.Length == 0) { arguments = new[] { string.Empty } } ; // Demo starten switch (arguments[0]) { case "messenger": var messenger = new Messenger(account: arguments.Length > 1 ? arguments[1] : "anonym"); await messenger.Start(); waitingForCommand = false; break; case "dropbox": var dropBox = new DropBox( account: arguments.Length > 1 ? arguments[1] : "anonym", folder: arguments.Length > 2 ? arguments[2] : @"d:\ma-workshop\dropbox\"); await dropBox.StartAsync(); return; case "bibliothek": var bibliothek = new Bibliothek(); await bibliothek.StartAsync(); return; case "exit": waitingForCommand = false; break; default: Console.WriteLine("Usage: messenger <account> | dropbox <account> <folder>| elastic | exit"); break; } } Console.WriteLine("Ciao"); Console.ReadLine(); } }