static void Main(string[] args) { if (args.Length == 4) { if (args.Contains("-i")) { int index = Array.IndexOf(args, "-i"); input = args[index + 1]; } if (args.Contains("-o")) { int index = Array.IndexOf(args, "-o"); output = args[index + 1]; } } else { Console.WriteLine("wrong arguments"); } PngOutput.CreatePngFile(input, output); ProcessRepo p = new ProcessRepo(); Console.ReadKey(); }
/// <summary> /// Make any necessary URI updates, then switch our state to busy /// </summary> private void BecomeBusy(ProcessRepo repo) { repoResultsPresenterActor.Tell(repo); App.GithubActors.ActorSelection(ActorPaths.GithubCoordinator).Tell(new SubscribeToProgressUpdates(Self)); Become(Busy); }
public void ProcessesStore_Refresh_ShouldVisitRepoGetAllOnce() { var store = new ProcessesStore(ProcessRepo.Object); store.Refresh(); ProcessRepo.Verify(r => r.GetAll(), Times.Once); }
public void ProcessesStore_GetAll_ShouldReturnEmptyCollection() { var testProcs = new IProcessModel[] { new ProcessModel() }; ProcessRepo.Setup(r => r.GetAll()).Returns(testProcs); var store = new ProcessesStore(ProcessRepo.Object); var procs = store.GetAll(); Assert.That(procs, Is.InstanceOf(typeof(IEnumerable <IProcessModel>))); Assert.That(!procs.Any()); }
public void ProcessesStore_GetAll_ShouldReturnCollectionFromRepoAfterRefresh() { var testProcs = new IProcessModel[] { new ProcessModel() }; ProcessRepo.Setup(r => r.GetAll()).Returns(testProcs); var store = new ProcessesStore(ProcessRepo.Object); store.Refresh(); var procs = store.GetAll(); Assert.That(procs, Is.EqualTo(testProcs)); }
public ProcessManager() { _processRepo = new ProcessRepo(); }
public ProcessController() { pr = new ProcessRepo(new MyModel()); }