コード例 #1
0
    public void TenSecondLimit_MultipleSecondsPast_NotReachedLimit()
    {
        var sut = new Assets.Scripts.Workers.Score_and_Limits.TimeLimit(10);

        sut.Update(1);
        Assert.IsFalse(sut.ReachedLimit());

        sut.Update(3);
        Assert.IsFalse(sut.ReachedLimit());

        sut.Update(5);
        Assert.IsFalse(sut.ReachedLimit());
    }
コード例 #2
0
    public void TenSecondLimit_TenSecondsPast_ReachedLimit()
    {
        var sut = new Assets.Scripts.Workers.Score_and_Limits.TimeLimit(10);

        sut.Update(10);
        Assert.IsTrue(sut.ReachedLimit());
    }