Ejemplo n.º 1
0
        public void TryGetBundle_ReturnsFalse_WhenBundleIsNotRegistered(string bundleName)
        {
            var bundleLookup = new BundleLookup(_testBundles);

            var result = bundleLookup.TryGetBundle(bundleName, out Bundle bundle);

            Assert.False(result);
            Assert.Null(bundle);
        }
Ejemplo n.º 2
0
        public void TryGetBundle_ReturnsValidBundle_WhenBundleIsRegistered(string bundleName)
        {
            var bundleLookup = new BundleLookup(_testBundles);

            var result = bundleLookup.TryGetBundle(bundleName, out Bundle bundle);

            Assert.True(result);
            Assert.NotNull(bundle);
            Assert.Equal(bundleName, bundle.Name);
        }
Ejemplo n.º 3
0
        public void TryGetBundle_ThrowsException_WhenNameIsNull()
        {
            var bundleLookup = new BundleLookup(_testBundles);

            Assert.Throws <ArgumentNullException>(() => bundleLookup.TryGetBundle(null, out Bundle bundle));
        }