public void Test_GenerateLogPath_Basic() { string expected = "C:\\Game\\main\\log.log"; var info = new LogPathGeneratorInfo() { BasePathDirectory = "C:\\Game", GameDirectory = "main", LogFile = "log.log" }; string generated = IW4MServer.GenerateLogPath(info); Assert.AreEqual(expected, generated); }
public void Test_GenerateLogPath_FixWineDriveMangling() { string expected = "/opt/server/game/log.log"; var info = new LogPathGeneratorInfo() { BasePathDirectory = "Z:\\opt\\server", GameDirectory = "game", LogFile = "log.log", IsWindows = false }; string generated = IW4MServer.GenerateLogPath(info).Replace('\\', '/'); Assert.AreEqual(expected, generated); }
public void Test_GenerateLogPath_WithBaseGameAndMod() { string expected = "C:\\GameAlt\\mods\\mod\\log.log"; var info = new LogPathGeneratorInfo() { BaseGameDirectory = "C:\\GameAlt", BasePathDirectory = "C:\\Game", GameDirectory = "main", ModDirectory = "mods\\mod", LogFile = "log.log" }; string generated = IW4MServer.GenerateLogPath(info); Assert.AreEqual(expected, generated); }