public void AssertValid_Valid() { string projFile = GetXmlProjectFilename("monkey"); m_mockFileOs.AddExistingFile(projFile); var proj = new ProjectId(DirectoryFinder.GetXmlDataFileName("monkey"), null); proj.AssertValid(); // no exception should be thrown here for a valid project. }
public void AssertValid_Invalid_SharedFolderNotFound() { var proj = new ProjectId(DirectoryFinder.GetDb4oDataFileName("monkey"), FwLinkArgs.kLocalHost); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (FwStartupException exception) { Assert.IsTrue(exception.ReportToUser); } }
public void AssertValid_InvalidProjectType() { var proj = new ProjectId(FDOBackendProviderType.kInvalid, DirectoryFinder.GetXmlDataFileName("invalid"), null); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (FwStartupException exception) { Assert.IsTrue(exception.ReportToUser); } }
public void AssertValid_Invalid_FileNotFound() { var proj = new ProjectId(DirectoryFinder.GetXmlDataFileName("notfound"), null); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (FwStartupException exception) { Assert.IsTrue(exception.ReportToUser); } }
public void AssertValid_Invalid_NoName() { var proj = new ProjectId(string.Empty, null); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (FwStartupException exception) { Assert.IsFalse(exception.ReportToUser); } }
public void CheckProperties() { string expectedProjectDir = Path.Combine(DirectoryFinder.ProjectsDirectory, "SomeTest"); m_mockFileOs.ExistingDirectories.Add(expectedProjectDir); const string type = "db4ocs"; const string host = "127.0.0.1"; string filename = DirectoryFinder.GetDb4oDataFileName("SomeTest"); var proj = new ProjectId(type, filename, host); proj.AssertValid(); Assert.AreEqual(Path.Combine(expectedProjectDir, filename), proj.Path); proj = new ProjectId(filename, host); proj.AssertValid(); Assert.AreEqual(Path.Combine(expectedProjectDir, filename), proj.Path); }
public void CheckProperties() { string expectedProjectDir = Path.Combine(FwDirectoryFinder.ProjectsDirectory, "SomeTest"); m_mockFileOs.ExistingDirectories.Add(expectedProjectDir); const string type = "db4ocs"; const string host = "127.0.0.1"; string filename = FdoFileHelper.GetDb4oDataFileName("SomeTest"); var proj = new ProjectId(type, filename, host); proj.AssertValid(); Assert.AreEqual(Path.Combine(expectedProjectDir, filename), proj.Path); proj = new ProjectId(filename, host); proj.AssertValid(); Assert.AreEqual(Path.Combine(expectedProjectDir, filename), proj.Path); }
public void AssertValid_Invalid_SharedFolderNotFound() { var proj = new ProjectId(FdoFileHelper.GetDb4oDataFileName("monkey"), FwLinkArgs.kLocalHost); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (StartupException exception) { Assert.IsTrue(exception.ReportToUser); } }
public void AssertValid_InvalidProjectType() { var proj = new ProjectId(FDOBackendProviderType.kInvalid, FdoFileHelper.GetXmlDataFileName("invalid"), null); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (StartupException exception) { Assert.IsTrue(exception.ReportToUser); } }
public void AssertValid_Invalid_FileNotFound() { var proj = new ProjectId(FdoFileHelper.GetXmlDataFileName("notfound"), null); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (StartupException exception) { Assert.IsTrue(exception.ReportToUser); } }
public void AssertValid_Invalid_NoName() { var proj = new ProjectId(string.Empty, null); try { proj.AssertValid(); Assert.Fail("FwStartupException expected"); } catch (StartupException exception) { Assert.IsFalse(exception.ReportToUser); } }
public void AssertValid_Valid() { string projFile = GetXmlProjectFilename("monkey"); m_mockFileOs.AddExistingFile(projFile); var proj = new ProjectId(FdoFileHelper.GetXmlDataFileName("monkey"), null); proj.AssertValid(); // no exception should be thrown here for a valid project. }