Exemplo n.º 1
0
        public void Should_see_same_instance_as_equal()
        {
            var projFile = MockRepository.GenerateStub <IProjectFile>();

            projFile.Stub(_ => _.Location).Return(new FileSystemPath(@"X:\Project\someFeature.feature"));
            var a = new NBehaveStepTask(projFile, "scenario", "step");

            Assert.AreEqual(a, a);
        }
Exemplo n.º 2
0
        public void Should_see_two_different_instances_with_same_feature_as_equal()
        {
            var aFile = MockRepository.GenerateStub <IProjectFile>();

            aFile.Stub(_ => _.Location).Return(new FileSystemPath(@"X:\Project\someFeature.feature"));
            var a     = new NBehaveStepTask(aFile, "scenario", "step");
            var bFile = MockRepository.GenerateStub <IProjectFile>();

            bFile.Stub(_ => _.Location).Return(new FileSystemPath(@"X:\Project\someFeature.feature"));
            var b = new NBehaveStepTask(bFile, "scenario", "step");

            Assert.AreEqual(a, b);
        }
        public void SetUp()
        {
            var codeGeneration = new CodeGenEventListener();
            server = MockRepository.GenerateMock<IRemoteTaskServer>();

            var featureFile = MockRepository.GenerateStub<IProjectFile>();
            featureFile.Stub(_ => _.Location).Return(new FileSystemPath(Source));
            scenarioTask = new NBehaveScenarioTask(featureFile, ScenarioTitle);
            var scenarioTaskNode = new TaskExecutionNode(null, scenarioTask);

            task = new NBehaveStepTask(featureFile, ScenarioTitle, "Given something");
            var stepTaskNode = new TaskExecutionNode(scenarioTaskNode, task);
            var nodes = new List<TaskExecutionNode> { scenarioTaskNode, stepTaskNode };
            resultPublisher = new ResharperResultPublisher(nodes, server, codeGeneration);

            feature = new Narrator.Framework.Feature("feature title");
            Because_of();
        }
Exemplo n.º 4
0
        public void SetUp()
        {
            var codeGeneration = new CodeGenEventListener();

            server = MockRepository.GenerateMock <IRemoteTaskServer>();

            var featureFile = MockRepository.GenerateStub <IProjectFile>();

            featureFile.Stub(_ => _.Location).Return(new FileSystemPath(Source));
            scenarioTask = new NBehaveScenarioTask(featureFile, ScenarioTitle);
            var scenarioTaskNode = new TaskExecutionNode(null, scenarioTask);

            task = new NBehaveStepTask(featureFile, ScenarioTitle, "Given something");
            var stepTaskNode = new TaskExecutionNode(scenarioTaskNode, task);
            var nodes        = new List <TaskExecutionNode> {
                scenarioTaskNode, stepTaskNode
            };

            resultPublisher = new ResharperResultPublisher(nodes, server, codeGeneration);

            feature = new Narrator.Framework.Feature("feature title");
            Because_of();
        }
Exemplo n.º 5
0
 public void Should_see_same_instance_as_equal()
 {
     var projFile = MockRepository.GenerateStub<IProjectFile>();
     projFile.Stub(_ => _.Location).Return(new FileSystemPath(@"X:\Project\someFeature.feature"));
     var a = new NBehaveStepTask(projFile, "scenario", "step");
     Assert.AreEqual(a, a);
 }
Exemplo n.º 6
0
 public void Should_see_two_different_instances_with_same_feature_as_equal()
 {
     var aFile = MockRepository.GenerateStub<IProjectFile>();
     aFile.Stub(_ => _.Location).Return(new FileSystemPath(@"X:\Project\someFeature.feature"));
     var a = new NBehaveStepTask(aFile, "scenario", "step");
     var bFile = MockRepository.GenerateStub<IProjectFile>();
     bFile.Stub(_ => _.Location).Return(new FileSystemPath(@"X:\Project\someFeature.feature"));
     var b = new NBehaveStepTask(bFile, "scenario", "step");
     Assert.AreEqual(a, b);
 }