public void SetCurrentGeneration_UpdatesCurrentGeneration()
    {
        var config = _handler.ReadConfig(3);

        Assert.AreEqual(3, config.DatabaseId);

        _handler.SetCurrentGenerationNumber(3, 5);

        var config2 = _handler.ReadConfig(3);

        Assert.AreEqual(5, config2.GenerationNumber);  //has been read back out

        //repeat with a different number, to be sure it wasn't just 5 to begin with.
        _handler.SetCurrentGenerationNumber(3, 7);

        var config3 = _handler.ReadConfig(3);

        Assert.AreEqual(7, config3.GenerationNumber);  //has been read back out
    }
Ejemplo n.º 2
0
    public void SetCurrentGeneration_UpdatesCurrentGeneration()
    {
        var config = _handler.ReadConfig(1);

        Assert.AreEqual(1, config.DatabaseId);

        _handler.SetCurrentGenerationNumber(1, 5);

        config.GenerationNumber = 2;  //set it werong
        var config1 = _handler.ReadConfig(1);

        Assert.AreEqual(5, config1.GenerationNumber);  //has been read back out

        //repeat with a different number, to be sure it wasn't just 5 to begin with.
        _handler.SetCurrentGenerationNumber(1, 7);

        config.GenerationNumber = 3;  //set it werong
        var config2 = _handler.ReadConfig(1);

        Assert.AreEqual(7, config2.GenerationNumber);  //has been read back out
    }