public void op_Execute_IEnumerable() { using (var file = new TempFile()) { file.Info.AppendLine("CANONICAL,SYNONYMS"); file.Info.AppendLine("1,One"); file.Info.AppendLine("1,Unit"); var obj = new LexiconTidy { BuildEngine = new Mock<IBuildEngine>().Object, Paths = new ITaskItem[] { new TaskItem(file.Info.FullName) } }; Assert.True(obj.Execute()); file.Info.Refresh(); Assert.True(file.Info.Exists); Assert.True(File.ReadAllText(file.Info.FullName).Contains("1,One;Unit")); } }
public void op_Execute_IEnumerableNull() { var obj = new LexiconTidy { BuildEngine = new Mock<IBuildEngine>().Object }; Assert.False(obj.Execute()); }
public void op_Execute_IEnumerableEmpty() { var obj = new LexiconTidy { BuildEngine = new Mock<IBuildEngine>().Object, Paths = new ITaskItem[] { } }; Assert.True(obj.Execute()); }