public void GetSourceControlBlockFailsIfNoBlocksInProject() { var task = new SourceControlTaskStub(); new Project("test", task); Assert.Throws <NotSupportedException>(() => task.RunGetSourceControlBlock()); }
public void GetSourceControlBlockRetrievesSingleBlockFromProject() { var expectedBlock = new SourceControlBlockStub(); var task = new SourceControlTaskStub(); var project = new Project("test", task); project.SourceControl.Add(expectedBlock); var actualBlock = task.RunGetSourceControlBlock(); Assert.AreSame(expectedBlock, actualBlock); }
public void GetSourceControlBlockFailsIfBlockNotFound() { var task = new SourceControlTaskStub { Use = "SomeBlock" }; var project = new Project("test", task); project.SourceControl.Add(new SourceControlBlockStub()); Assert.Throws<NotSupportedException>(() => task.RunGetSourceControlBlock()); }
public void GetSourceControlBlockFailsIfBlockNotFound() { var task = new SourceControlTaskStub { Use = "SomeBlock" }; var project = new Project("test", task); project.SourceControl.Add(new SourceControlBlockStub()); Assert.Throws <NotSupportedException>(() => task.RunGetSourceControlBlock()); }
public void GetSourceControlBlockRetrievesNamedBlockFromProject() { var blockName = "BlockToFind"; var expectedBlock = new SourceControlBlockStub { Name = blockName }; var task = new SourceControlTaskStub { Use = blockName }; var project = new Project("test", task); project.SourceControl.Add(expectedBlock); project.SourceControl.Add(new SourceControlBlockStub()); var actualBlock = task.RunGetSourceControlBlock(); Assert.AreSame(expectedBlock, actualBlock); }
public void GetSourceControlBlockFailsIfNoBlocksInProject() { var task = new SourceControlTaskStub(); new Project("test", task); Assert.Throws<NotSupportedException>(() => task.RunGetSourceControlBlock()); }