public void ReadPathArray()
        {
            var config = ReadJson(new TestFileReader());

            var expected = ConfigurationCreators.CreateCollectionWithPaths(
                new RequirePath("jquery", "jquery-1.10.2", "jquery.min")
                );

            CustomAssert.JsonEquals(expected, config);
        }
        public void ReadCompactedPath()
        {
            var config = ReadJson(new TestFileReader());

            var expected = ConfigurationCreators.CreateCollectionWithPaths(new RequirePath
            {
                Key   = "jquery",
                Value = "jquery-1.10.2"
            });

            CustomAssert.JsonEquals(expected, config);
        }
        public void ReadExpandedPath()
        {
            var config = ReadJson(new TestFileReader());

            var expected = ConfigurationCreators.CreateCollectionWithPaths(
                new RequirePath("jquery-validate", "jquery.validate")
            {
                DefaultBundle = "jqValidate"
            }
                );

            CustomAssert.JsonEquals(expected, config);
        }
        public void OverridePathsWithSameKey()
        {
            var jqueryPath    = new RequirePath("jquery", "jquery-1.06.2");
            var altJqueryPath = new RequirePath("jquery", "jquery-1.05.3");

            var firstCollection  = ConfigurationCreators.CreateCollectionWithPaths(jqueryPath);
            var secondCollection = ConfigurationCreators.CreateCollectionWithPaths(altJqueryPath);

            var merger = ConfigurationCreators.CreateDefaultConfigMerger(firstCollection, secondCollection);
            var merged = merger.GetMerged();

            var expected = ConfigurationCreators.CreateCollectionWithPaths(altJqueryPath);

            CustomAssert.JsonEquals(expected, merged);
        }
        public void UnitePathsWhenKeysAreDifferent()
        {
            var jqueryPath  = new RequirePath("jquery", "jquery-1.06.2");
            var amplifyPath = new RequirePath("amplify", "amplify-10.3.5");

            var firstCollection  = ConfigurationCreators.CreateCollectionWithPaths(jqueryPath);
            var secondCollection = ConfigurationCreators.CreateCollectionWithPaths(amplifyPath);

            var merger = ConfigurationCreators.CreateDefaultConfigMerger(firstCollection, secondCollection);
            var merged = merger.GetMerged();

            var expected = ConfigurationCreators.CreateCollectionWithPaths(jqueryPath, amplifyPath);

            CustomAssert.JsonEquals(expected, merged);
        }