Пример #1
0
    public void MemberState_Resource_StartsWithCorrectNumber()
    {
        var resource = new InMemoryResourceType {
            Name = "SampleResource", StartingAmount = 8
        };
        var member = new MemberState(1, new StatAddends {
            ResourceTypes = resource.AsArray()
        });

        Assert.AreEqual(8, member[resource]);
    }
Пример #2
0
    public void MemberState_GainPrimaryResourceAmount_IsCorrect()
    {
        var resource = new InMemoryResourceType {
            Name = "SampleResource", MaxAmount = 3
        };
        var member = new MemberState(1, new StatAddends {
            ResourceTypes = resource.AsArray()
        });

        member.GainPrimaryResource(2);

        Assert.AreEqual(member[resource], 2);
    }