示例#1
0
        public void PassiveTreeBuildUrlData_ConstructorDecode(CharacterClass characterClass, int ascendancyClass, int version, bool fullscreen)
        {
            var passiveNodeIds = new List <ushort>()
            {
                100, 200, 300
            };

            var expected = new PassiveTreeBuildUrlData(characterClass, ascendancyClass, passiveNodeIds, version, fullscreen);

            Assert.AreEqual(characterClass, expected.CharacterClass);
            Assert.AreEqual(ascendancyClass, expected.AscendancyClass);
            Assert.AreEqual(passiveNodeIds, expected.PassiveNodeIds);
            Assert.AreEqual(version, expected.Version);
            Assert.AreEqual(fullscreen, expected.Fullscreen);

            var encoded = expected.EncodeUrl();

            var actual = new PassiveTreeBuildUrlData(encoded);

            Assert.AreEqual(expected.CharacterClass, actual.CharacterClass);
            Assert.AreEqual(expected.AscendancyClass, actual.AscendancyClass);
            Assert.AreEqual(expected.PassiveNodeIds, actual.PassiveNodeIds);
            Assert.AreEqual(expected.Version, actual.Version);
            Assert.AreEqual(expected.Fullscreen, actual.Fullscreen);
        }
示例#2
0
        public void PassiveTreeBuildUrlData_ConstructorDecode_Empty()
        {
            var expected = new PassiveTreeBuildUrlData {
            };
            var actual   = new PassiveTreeBuildUrlData(string.Empty);

            Assert.AreEqual(expected.CharacterClass, actual.CharacterClass);
            Assert.AreEqual(expected.AscendancyClass, actual.AscendancyClass);
            Assert.AreEqual(expected.PassiveNodeIds, actual.PassiveNodeIds);
            Assert.AreEqual(expected.Version, actual.Version);
            Assert.AreEqual(expected.Fullscreen, actual.Fullscreen);
        }