public void GetSourceContextFile_App() { var filePath = Path.Combine(AppContext.BaseDirectory, AgentOptions.SourceContextFileName); try { File.Create(filePath).Dispose(); Assert.Equal(filePath, AgentOptions.GetSourceContextFile(null)); } finally { File.Delete(filePath); } }
public void GetSourceContextFile_Null() => Assert.Null(AgentOptions.GetSourceContextFile(null));
public void GetSourceContextFile_Param_Invalid() => Assert.Throws <FileNotFoundException> (() => AgentOptions.GetSourceContextFile(_sourceContext + "something"));
public void GetSourceContextFile_Env() => TestEnvVariable(() => AgentOptions.GetSourceContextFile(null), AgentOptions.SourceContextEnvironmentVariable, _sourceContext);
public void GetSourceContextFile_Param() => Assert.Equal(_sourceContext, AgentOptions.GetSourceContextFile(_sourceContext));