public void ProjectDirSubstitutionTest2() { var env = new MockDocumentEnvironment() { ProjectDirectory = "B" }; var target = new VariableSubstitutor(env); string value = "A$(ProjectDir)C"; string result = target.Substitute(value); Assert.AreEqual("ABC", result); }
public void ItemDirectorySubstitutionTest4() { var env = new MockDocumentEnvironment() { ItemDirectory = "B" }; var target = new VariableSubstitutor(env); string value = "A$(ItemDirectory)CC$(ItemDirectory)A"; string result = target.Substitute(value); Assert.AreEqual("ABCCBA", result); }
public void ProjectDirSubstitutionTest1() { var env = new MockDocumentEnvironment() { ProjectDirectory = "c:\\test\\ProjectDirectory" }; var target = new VariableSubstitutor(env); string value = "$(ProjectDir)"; string result = target.Substitute(value); Assert.AreEqual(env.ProjectDirectory, result); }
public void AllVariablesTest() { var env = new MockDocumentEnvironment() { ItemDirectory = "A", ProjectDirectory = "B", SolutionDirectory = "C" }; var target = new VariableSubstitutor(env); string value = "$(ItemDirectory)$(ProjectDirectory)$(SolutionDirectory)"; string result = target.Substitute(value); Assert.AreEqual("ABC", result); }
public void UnsupportedVariablesTest() { var env = new MockDocumentEnvironment() { ItemDirectory = "A", ProjectDirectory = "B", SolutionDirectory = "C" }; var target = new VariableSubstitutor(env); string value = "$(Unsupported)$"; string result = target.Substitute(value); Assert.AreEqual(value, result); }
public IRestRequest GenerateFootballerDetailRequest(int footballerId) { var resolvedUrl = VariableSubstitutor.SubstituteFootballerId(GlobalConfig.FootballerDetailsPath, footballerId); return(Build(resolvedUrl)); }
public IRestRequest GeneratePicksRequest(int teamId, int eventId) { var resolvedUrl = VariableSubstitutor.Substitute(GlobalConfig.PicksPath, teamId, eventId); return(Build(resolvedUrl)); }
public IRestRequest GenerateLeagueH2hStandingsRequest(int leagueId) { var resolvedLeaguePath = VariableSubstitutor.SubstituteLeague(GlobalConfig.LeagueH2hPath, leagueId); return(Build(resolvedLeaguePath)); }
public IRestRequest GenerateHistoryRequest(int teamId) { var resolvedUrl = VariableSubstitutor.Substitute(GlobalConfig.HistoryPath, teamId, 0); return(Build(resolvedUrl)); }
public IRestRequest GenerateLiveDataRequest(int eventId) { var resolvedUrl = VariableSubstitutor.Substitute(GlobalConfig.LivePath, 0, eventId); return(Build(resolvedUrl)); }