示例#1
0
        private static BuildUrlDeserializer CreateSut(string url)
        {
            var buildConverter = new BuildConverter(null);

            buildConverter.RegisterDeserializersFactories(
                PathofexileUrlDeserializer.TryCreate,
                PoeplannerUrlDeserializer.TryCreate);
            buildConverter.RegisterDefaultDeserializer(u => new NaivePoEUrlDeserializer(u, null));
            return(buildConverter.GetUrlDeserializer(url));
        }
示例#2
0
        private static SkillTreeSerializer CreateSut(string url)
        {
            var buildConverter = new BuildConverter(null);

            buildConverter.RegisterDeserializersFactories(
                PathofexileUrlDeserializer.TryCreate,
                PoeplannerUrlDeserializer.TryCreate);
            buildConverter.RegisterDefaultDeserializer(u => new NaivePoEUrlDeserializer(u, null));
            var buildData = buildConverter.GetUrlDeserializer(url).GetBuildData();
            var allNodes  = Mock.Of <ICollection <ushort> >(c => c.Contains(It.IsAny <ushort>()));

            return(new SkillTreeSerializer(buildData, allNodes));
        }