Esempio n. 1
0
        public void GetConfigurationAssemblyPath_TestDecoratedWithAssemblyFile_AllowsAccessToConfigurationValuesFromCustomConfiguration()
        {
            string assemblyPath = ExternalConfiguration.GetConfigurationAssemblyPath(MethodBase.GetCurrentMethod());

            ICachingConfiguration subject = null;
            Assert.That(() => subject = new CachingConfiguration(assemblyPath), Throws.Nothing);

            Assert.That(subject.TimeToExpire("expiration1"), Is.EqualTo(1.Seconds()));
            Assert.That(subject.HasDependencies("cache2"), Is.True);
            Assert.That(subject.GetDependantCaches("cache1"), Is.EqualTo(new[]{"cache1_1", "cache1_2"}));
        }