Exemple #1
0
        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());
 }
Exemple #4
0
        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());
        }
Exemple #5
0
        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 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);
 }
Exemple #7
0
        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());
 }