本文整理汇总了C#中ThoughtWorks.CruiseControl.Core.Modification类的典型用法代码示例。如果您正苦于以下问题:C# Modification类的具体用法?C# Modification怎么用?C# Modification使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Modification类属于ThoughtWorks.CruiseControl.Core命名空间,在下文中一共展示了Modification类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetupModification
public void SetupModification(Modification[] modifications)
{
foreach (Modification mod in modifications)
{
mod.Url = String.Format(_url, mod.FolderName.Length == 0 ? mod.FileName : mod.FolderName + "/" + mod.FileName);
}
}
开发者ID:vardars,项目名称:ci-factory,代码行数:7,代码来源:ViewCVSUrlBuilder.cs
示例2: Parse
public Modification[] Parse(TextReader history, DateTime from, DateTime to)
{
var modifications = new List<Modification>();
var document = XDocument.Load(history);
var fromDate = from.ToString("s");
var toDate = to.ToString("s");
foreach (XElement change in document.Descendants("change"))
{
var date = DateTime.Parse(
change.Attribute("date").Value);
if ((date >= from) &&
(date <= to))
{
var modification = new Modification
{
FileName = change.Attribute("file").Value,
ModifiedTime = date,
FolderName = change.Attribute("folder").Value,
Type = change.Attribute("type").Value
};
modifications.Add(modification);
}
}
return modifications.ToArray();
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:26,代码来源:IndexFileHistoryParser.cs
示例3: ShouldNotAcceptModificationsWithNullFolder
public void ShouldNotAcceptModificationsWithNullFolder()
{
Modification modification = new Modification();
PathFilter filter = new PathFilter();
filter.Pattern = "*.*";
Assert.IsFalse(filter.Accept(modification));
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:7,代码来源:PathFilterTest.cs
示例4: ShouldCheckModificationsUntilThereAreNoModsInModificationDelay
public void ShouldCheckModificationsUntilThereAreNoModsInModificationDelay()
{
quietPeriod.ModificationDelaySeconds = 45;
// last build was at 12:01:00, current build is at 12:02:00
// with a modification just at 12:01:30...
Modification[] newMods = new Modification[] { CreateModificationAtTime(12, 01, 30) };
// ...should wait for 15 seconds so that the 45 second delay completes (at 12:02:15)
mockSourceControl.ExpectAndReturn("GetModifications", newMods, lastBuild, thisBuild);
mockDateTimeProvider.Expect("Sleep", TimeSpan.FromSeconds(15));
mockDateTimeProvider.ExpectAndReturn("Now", CreateDateTime(12, 02, 15));
// After this time it should ask for modifications again. Introduce a new modification at 12:02:10, meaning that the ealiest a build can start is at 12:02:55
// i.e. 40 seconds from the time of the current build (12:02:15)
newMods = new Modification[] {newMods[0], CreateModificationAtTime(12, 02, 10)};
mockSourceControl.ExpectAndReturn("GetModifications", newMods, lastBuild, IntegrationResultMother.CreateSuccessful(CreateDateTime(12, 02, 15)));
mockDateTimeProvider.Expect("Sleep", TimeSpan.FromSeconds(40));
mockDateTimeProvider.ExpectAndReturn("Now", CreateDateTime(12, 02, 55));
mockSourceControl.ExpectAndReturn("GetModifications", newMods, lastBuild, IntegrationResultMother.CreateSuccessful(CreateDateTime(12, 02, 55)));
Modification[] actualMods = quietPeriod.GetModifications((ISourceControl) mockSourceControl.MockInstance, lastBuild, thisBuild);
Assert.AreEqual(newMods, actualMods);
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:26,代码来源:QuietPeriodTest.cs
示例5: ShouldRejectModificationsWithNullComments
public void ShouldRejectModificationsWithNullComments()
{
Modification modification = new Modification();
CommentFilter filter = new CommentFilter();
filter.Pattern = ".*";
Assert.IsFalse(filter.Accept(modification), "Should not have matched but did.");
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:7,代码来源:CommentFilterTest.cs
示例6: ShouldFilterSpecifiedAction
public void ShouldFilterSpecifiedAction()
{
Modification mod = new Modification();
mod.Type = "Created";
filter.Actions = new string[] {"Created"};
Assert.IsTrue(filter.Accept(mod), "Action not filtered");
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:8,代码来源:ActionFilterTest.cs
示例7: ShouldFilterSpecifiedUser
public void ShouldFilterSpecifiedUser()
{
Modification mod = new Modification();
mod.UserName = "bob";
filter.UserNames = new string[] { "bob" };
Assert.IsTrue(filter.Accept(mod));
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:8,代码来源:UserFilterTest.cs
示例8: ShouldRejectModificationsWithMatchingComments
public void ShouldRejectModificationsWithMatchingComments()
{
Modification modification = new Modification();
modification.Comment = "This is a comment.";
CommentFilter filter = new CommentFilter();
filter.Pattern = ".* is not a .*";
Assert.IsFalse(filter.Accept(modification), "Should not have matched but did.");
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:8,代码来源:CommentFilterTest.cs
示例9: GetModificationsDoesNotCreateLabelWhenThereAreNoModifications
public void GetModificationsDoesNotCreateLabelWhenThereAreNoModifications()
{
ProcessResult result = new ProcessResult("",string.Empty, 0, false);
Modification[] emptyArray = new Modification[0];
_historyParser.SetupResult("Parse", emptyArray, typeof(TextReader), typeof(DateTime), typeof(DateTime));
_executor.ExpectAndReturn("Execute", result, new IsTypeOf(typeof(ProcessInfo)));
_executor.ExpectNoCall("Execute", typeof(ProcessInfo));
_vss.GetModifications(IntegrationResultMother.CreateSuccessful(DateTime.Now), IntegrationResultMother.CreateSuccessful(DateTime.Now));
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:10,代码来源:VssApplyLabelTest.cs
示例10: ParseUsernameAndUKDate
public void ParseUsernameAndUKDate()
{
Modification mod = new Modification();
string line = "foo\r\nUser: Admin Date: 16/9/02 Time: 22:40\r\n";
CheckInParser myParser = new CheckInParser(line, new VssLocale(new CultureInfo("en-GB")));
myParser.ParseUsernameAndDate(mod);
Assert.AreEqual("Admin", mod.UserName);
Assert.AreEqual(new DateTime(2002, 9, 16, 22, 40, 0), mod.ModifiedTime);
}
开发者ID:aravindmc,项目名称:CruiseControl.NET,代码行数:10,代码来源:VssHistoryParserTest.cs
示例11: CanAssignFileInfoWithNoPath
public void CanAssignFileInfoWithNoPath()
{
const string file = "context.js";
Modification modification = new Modification();
parser.AssignFileInfo( modification, file );
Assert.AreEqual( string.Empty, modification.FolderName );
Assert.AreEqual( file, modification.FileName );
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:10,代码来源:ClearCaseHistoryParserTest.cs
示例12: AccuRevMotherWindows
public AccuRevMotherWindows()
{
historyOutputReader = new StringReader(historyOutputDataWindows);
/// The date ranges.
oldestHistoryModification = DateTime.Parse("2006/11/22 11:10:44");
newestHistoryModification = DateTime.Parse("2006/11/22 11:11:00");
historyOutputModifications = new Modification[5];
historyOutputModifications[0] = new Modification();
historyOutputModifications[0].ChangeNumber = "12245";
historyOutputModifications[0].Comment = "New Project for accessing SICS/nt web services";
historyOutputModifications[0].FileName = "AssemblyInfo.cs";
historyOutputModifications[0].FolderName = @"Dev\Server\Interface\Properties\";
historyOutputModifications[0].ModifiedTime = new DateTime(2006,11,22,11,11,00);
historyOutputModifications[0].Type = "add";
historyOutputModifications[0].UserName = "joe_user";
historyOutputModifications[1] = new Modification();
historyOutputModifications[1].ChangeNumber = "12244";
historyOutputModifications[1].Comment = "New Project for accessing web services";
historyOutputModifications[1].FileName = "Interface";
historyOutputModifications[1].FolderName = @"Dev\Server\";
historyOutputModifications[1].ModifiedTime = new DateTime(2006,11,22,11,10,44);
historyOutputModifications[1].Type = "add";
historyOutputModifications[1].UserName = "sam_spade";
historyOutputModifications[2] = new Modification();
historyOutputModifications[2].ChangeNumber = "12244";
historyOutputModifications[2].Comment = "New Project for accessing web services";
historyOutputModifications[2].FileName = "App.config";
historyOutputModifications[2].FolderName = @"Dev\Server\Interface\";
historyOutputModifications[2].ModifiedTime = new DateTime(2006, 11, 22, 11, 10, 44);
historyOutputModifications[2].Type = "add";
historyOutputModifications[2].UserName = "sam_spade";
historyOutputModifications[3] = new Modification();
historyOutputModifications[3].ChangeNumber = "12244";
historyOutputModifications[3].Comment = "New Project for accessing web services";
historyOutputModifications[3].FileName = "CommonTypes.cs";
historyOutputModifications[3].FolderName = @"Dev\Server\Interface\";
historyOutputModifications[3].ModifiedTime = new DateTime(2006, 11, 22, 11, 10, 44);
historyOutputModifications[3].Type = "add";
historyOutputModifications[3].UserName = "sam_spade";
historyOutputModifications[4] = new Modification();
historyOutputModifications[4].ChangeNumber = "12244";
historyOutputModifications[4].Comment = "New Project for accessing web services";
historyOutputModifications[4].FileName = "Connection.cs";
historyOutputModifications[4].FolderName = @"Dev\Server\Interface\";
historyOutputModifications[4].ModifiedTime = new DateTime(2006, 11, 22, 11, 10, 44);
historyOutputModifications[4].Type = "add";
historyOutputModifications[4].UserName = "sam_spade";
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:55,代码来源:AccuRevMother.cs
示例13: ShouldBuildValidUrls
public void ShouldBuildValidUrls()
{
HgWebUrlBuilder hgweb = new HgWebUrlBuilder();
hgweb.Url = "http://selenic.com/hg/index.cgi/";
Modification[] modifications = new Modification[] {new Modification()};
modifications[0].Version = "4a064e1977f8";
hgweb.SetupModification(modifications);
Assert.That(modifications[0].Url, Is.Not.Null);
Assert.That(modifications[0].Url, Is.EqualTo("http://selenic.com/hg/index.cgi/rev/4a064e1977f8"));
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:11,代码来源:HgWebUrlBuilderTest.cs
示例14: CreateModifications
protected Modification[] CreateModifications()
{
Modification[] testModifications = new Modification[]
{
new Modification(), new Modification(), new Modification()
};
testModifications[0].ChangeNumber = "100";
testModifications[1].ChangeNumber = "2000";
testModifications[2].ChangeNumber = "30000";
return (testModifications);
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:11,代码来源:ChangeSynergyUrlBuilderTest.cs
示例15: AssertModification
private void AssertModification(Modification mod, int changeNumber, string revision, string file, string folder, DateTime modifiedTime, string type, string email, string username, string comment)
{
Assert.AreEqual(changeNumber.ToString(), mod.ChangeNumber);
Assert.AreEqual(file, mod.FileName);
Assert.AreEqual(folder, mod.FolderName);
Assert.AreEqual(modifiedTime, mod.ModifiedTime);
Assert.AreEqual(type, mod.Type);
Assert.AreEqual(email, mod.EmailAddress);
Assert.AreEqual(username, mod.UserName);
Assert.AreEqual(comment, mod.Comment);
Assert.AreEqual(revision, mod.Version);
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:12,代码来源:P4HistoryParserTest.cs
示例16: ModificationsAreComparedByModifiedDatetime
public void ModificationsAreComparedByModifiedDatetime()
{
Modification alpha = new Modification();
alpha.ModifiedTime = new DateTime(1975, 3, 3);
Modification beta = new Modification();
alpha.ModifiedTime = new DateTime(1961, 3, 3);
Assert.IsTrue(alpha.CompareTo(beta) > 0, string.Format("expected alpha greater than beta {0}", alpha.CompareTo(beta)));
Assert.IsTrue(alpha.CompareTo(alpha) == 0, string.Format("expected alpha-beta equality {0}", alpha.CompareTo(beta)));
Assert.IsTrue(beta.CompareTo(alpha) < 0, string.Format("expected alpha less than beta {0}", alpha.CompareTo(beta)));
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:12,代码来源:ModificationTest.cs
示例17: ParseUsernameAndUSDate
public void ParseUsernameAndUSDate()
{
Modification mod = new Modification();
string line = "foo\r\nUser: Admin Date: 9/16/02 Time: 2:40p\r\n";
CheckInParser parser = new CheckInParser(line, new VssLocale(new CultureInfo("en-US")));
parser.ParseUsernameAndDate(mod);
string expectedUsername = "Admin";
DateTime expectedDate = new DateTime(2002, 09, 16, 14, 40, 0);
Assert.AreEqual(expectedUsername, mod.UserName);
Assert.AreEqual(expectedDate, mod.ModifiedTime);
}
开发者ID:aravindmc,项目名称:CruiseControl.NET,代码行数:12,代码来源:VssHistoryParserTest.cs
示例18: AppendModifications
public void AppendModifications()
{
WorkflowResult result = new WorkflowResult();
Modification mod1 = new Modification();
Modification mod2 = new Modification();
result.Modifications = new Modification[] { mod1 };
result.Modifications = new Modification[] { mod2 };
Assert.AreEqual(2, result.Modifications.Length);
Assert.AreEqual(mod1, result.Modifications[0]);
Assert.AreEqual(mod2, result.Modifications[1]);
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:12,代码来源:WorkflowResultTest.cs
示例19: CanAssignFileInfo
public void CanAssignFileInfo()
{
const string path = @"D:\CCase\ppunjani_view\RefArch\tutorial\wwhdata\common";
const string file = "context.js";
const string fullPath = path + "\\" + file;
Modification modification = new Modification();
parser.AssignFileInfo( modification, fullPath );
Assert.AreEqual( path, modification.FolderName );
Assert.AreEqual( file, modification.FileName );
}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:12,代码来源:ClearCaseHistoryParserTest.cs
示例20: CommentWithIssueNumberOnly
public void CommentWithIssueNumberOnly()
{
Modification[] mods = new Modification[1];
mods[0] = new Modification();
mods[0].FolderName = "/trunk";
mods[0].FileName = "nant.bat";
mods[0].ChangeNumber = "3";
mods[0].Comment = "5000";
RegExIssueTrackerUrlBuilder regexIssue = CreateBuilder();
regexIssue.SetupModification(mods);
Assert.IsNull(mods[0].IssueUrl);
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:14,代码来源:RegExIssueTrackerUrlBuilderTest.cs
注:本文中的ThoughtWorks.CruiseControl.Core.Modification类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论