public void CleanUpNameForType_Default_onlyName()
        {
            m_defaultBepType = FDOBackendProviderType.kDb4oClientServer;
            string expectedPath = Path.Combine(Path.Combine(DirectoryFinder.ProjectsDirectory, "ape"),
                                               DirectoryFinder.GetDb4oDataFileName("ape"));

            m_localCsSvcs.Stub(cs => cs.IdForLocalProject("ape")).Return(expectedPath);
            m_mockFileOs.AddExistingFile(expectedPath);

            ProjectId proj = new ProjectId("ape", null);

            Assert.AreEqual(expectedPath, proj.Path);
            Assert.AreEqual(FDOBackendProviderType.kDb4oClientServer, proj.Type);
            Assert.IsTrue(proj.IsValid);
        }
Beispiel #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Fixture setup.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public override void  FixtureSetup()
		{
			base.FixtureSetup();
			IClientServerServices clientSvcs = MockRepository.GenerateStub<IClientServerServices>();
			ReflectionHelper.SetProperty(typeof(ClientServerServices), "Current", clientSvcs);
			m_localCsSvcs = MockRepository.GenerateStub<ILocalClientServerServices>();
			clientSvcs.Stub(x => x.Local).Return(m_localCsSvcs);
			m_localCsSvcs.Stub(cs => cs.DefaultBackendType).Do(new Func<FDOBackendProviderType>( () => m_defaultBepType));
		}
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Fixture setup.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override void  FixtureSetup()
        {
            base.FixtureSetup();
            IClientServerServices clientSvcs = MockRepository.GenerateStub <IClientServerServices>();

            ReflectionHelper.SetProperty(typeof(ClientServerServices), "Current", clientSvcs);
            m_localCsSvcs = MockRepository.GenerateStub <ILocalClientServerServices>();
            clientSvcs.Stub(x => x.Local).Return(m_localCsSvcs);
            m_localCsSvcs.Stub(cs => cs.DefaultBackendType).Do(new Func <FDOBackendProviderType>(() => m_defaultBepType));
        }