单元测试检查旧编译,看不到代码更改

时间:2019-03-31 07:51:31

标签: c# visual-studio unit-testing console-application

我正在tic-tac-toe n中工作,但在测试中遇到了麻烦,似乎没有更新代码,并且总是与旧版本一起工作

[TestMethod]
    public void ComprobarVictoria_Medio_Juego()
    {
        testJugador = new Jugador("claudio", 0);
        testJuego = new Juego(new Tablero(4, 4));

        testJuego.participantes.Add(testJugador);

        testJugador.AsignarFicha(new Ficha("Negras", testJugador));


        Assert.IsTrue(testJuego.ComprobarGanadorMedio(0,0,0)); 

    }

这是我的错误

Screenshot of exception message

现在检查代码

public bool ComprobarGanadorMedio(int a, int b, int c)
    {
        return true;
    }

我使change方法返回true,以检查错误是我的代码还是测试,并在没有退出行的情况下连续给我错误 In line 30 and its empty

似乎有旧代码,看不到更改。

我尝试编译,调试...不起作用, 有什么想法吗?

0 个答案:

没有答案