Beispiel #1
0
        public void SomeCloneTests()
        {
            var event1 = SampleGenerator.GameEventTest1();
            var event2 = event1.CloneJson();

            Assert.AreEqual(event1.Properties.Count, event2.Properties.Count);
            Assert.AreEqual(event1.Properties["stat_kill_creepy"], event2.Properties["stat_kill_creepy"]);
        }
Beispiel #2
0
        public void GameEventEncryptionTest()
        {
            CommonConfiguration.Instance.EncryptionConfiguration.IsEncryptionEnabled = true;
            CommonConfiguration.Instance.EncryptionConfiguration.Salt = "o6806642kbM7c5";

            var event1 = SampleGenerator.GameEventTest1();
            var packet = SampleGenerator.GamePacketTest1();

            packet.GameEvent = event1;

            // is the content encrypted
            Assert.IsTrue(packet.Content.Contains("76561198024856042") == false);

            Assert.AreEqual(event1.Properties["stat_avg_level_1"], packet.GameEvent.Properties["stat_avg_level_1"]);
        }