Start() public method

public Start ( ) : bool
return bool
Ejemplo n.º 1
0
        public void SetUp()
        {
            guiToolkitMock = new Mock<IGUIToolkit> ();
            App.Current.GUIToolkit = guiToolkitMock.Object;
            mockDialogs = new Mock<IDialogs> ();
            App.Current.Dialogs = mockDialogs.Object;

            dbMock = new Mock<IStorage> ();
            dbManagerMock = new Mock<IStorageManager> ();
            dbManagerMock.Setup (d => d.ActiveDB).Returns (dbMock.Object);
            App.Current.DatabaseManager = dbManagerMock.Object;

            toolsManager = new ToolsManager ();
            importer = new ProjectImporter {
                Description = "",
                ImportFunction = () => null,
                FilterName = "",
                Extensions = new string [] { },
                NeedsEdition = false,
                CanOverwrite = false,
            };
            toolsManager.ProjectImporters.Add (importer);
            toolsManager.Start ();
        }
Ejemplo n.º 2
0
 public void TestNoImporters()
 {
     var toolsManager = new ToolsManager ();
     toolsManager.Start ();
     App.Current.EventsBroker.Publish<ImportProjectEvent> (new ImportProjectEvent ());
     mockDialogs.Verify (g => g.ErrorMessage (It.IsAny<string> (), It.IsAny<object> ()), Times.Once ());
     toolsManager.Stop ();
 }