public TargetFluentInterfaceTests() { _context = new Mock <ITaskContextInternal>(); _target = new Mock <ITargetInternal>(); _fluent = new TargetFluentInterface(); _fluent.Target = _target.Object; _fluent.Context = _context.Object; _fluent.CoreTaskFluent = new CoreTaskFluentInterface(new LinuxTaskFluentInterface(), new ToolsFluentInterface()); _fluent.TaskFluent = new TaskFluentInterface(new IisTaskFluentInterface(), new WebApiFluentInterface(), new GitFluentInterface(), new DockerFluentInterface(), new HttpClientFactory()); }
public void DepencdeOffAsync_AddWithTarget() { var t2 = new Target(_targetTree, "Target2", null); var fluent2 = new TargetFluentInterface(); fluent2.Target = t2; fluent2.Context = _context; fluent2.DependenceOfAsync(_fluent); Assert.True(_target.Dependencies.ContainsKey("Target2")); }
public TargetFluentInterfaceIntegrationTestsWithTarget() { _taskFactory = new Mock <ITaskFactory>(); _context = new TaskContextInternal(null, null, null, new TargetTree(null, null), null, _taskFactory.Object, null); _target = new Target(new TargetTree(null, null), "TestTarget", null); _fluent = new TargetFluentInterface(); _fluent.Target = _target; _fluent.Context = _context; var coreTaskFluentInterface = new CoreTaskFluentInterface(new LinuxTaskFluentInterface(), new ToolsFluentInterface()); coreTaskFluentInterface.Context = _context; _fluent.CoreTaskFluent = coreTaskFluentInterface; var taskFluentInterface = new TaskFluentInterface(new IisTaskFluentInterface(), new WebApiFluentInterface(), new HttpClientFactory()); taskFluentInterface.Context = _context; _fluent.TaskFluent = taskFluentInterface; }