public void AddNewPlayerGetContribution()
        {
            var contributionManager = new ContributionManager(new ConcurrentDictionary <uint, List <PlayerContribution> >(), ContributionFactorReferenceList);

            contributionManager.AddCharacter(100);
            var result = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result == 0);
        }
        public void UpdateCharacterThenAdd()
        {
            var contributionManager = new ContributionManager(new ConcurrentDictionary <uint, List <PlayerContribution> >(), ContributionFactorReferenceList);

            contributionManager.UpdateContribution(100, 1);
            contributionManager.UpdateContribution(100, 2);
            contributionManager.UpdateContribution(100, 2);
            contributionManager.UpdateContribution(100, 1);

            contributionManager.AddCharacter(100);

            var result = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result == 8);
        }
        public void RemoveCharacterFromNotEmptyWrongId()
        {
            var contributionManager = new ContributionManager(new ConcurrentDictionary <uint, List <PlayerContribution> >(), ContributionFactorReferenceList);

            contributionManager.AddCharacter(100);
            Assert.IsFalse(contributionManager.RemoveCharacter(101));

            contributionManager.UpdateContribution(100, 1);
            var result = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result == 1);

            Assert.IsTrue(contributionManager.RemoveCharacter(100));


            contributionManager.UpdateContribution(100, 1);
            var result2 = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result2 == 1);
        }
        public void AddNewPlayerAddContribution()
        {
            var contributionManager = new ContributionManager(new ConcurrentDictionary <uint, List <PlayerContribution> >(), ContributionFactorReferenceList);

            contributionManager.AddCharacter(100);
            contributionManager.UpdateContribution(100, 1);
            var result = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result == 1);

            contributionManager.UpdateContribution(100, 1);
            var result2 = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result2 == 2);

            // Has a value of 3
            contributionManager.UpdateContribution(100, 2);
            var result3 = contributionManager.GetContributionValue(100);

            Assert.IsTrue(result3 == 5);
        }