public bool Equals(NBehaveStepTestElement other)
 {
     if (other == null)
         return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && Equals(other._step, _step);
 }
 public void Should_consider_same_instance_equal()
 {
     var featureFile = ResharperStubs.StubFeatureFile();
     var parentParent = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
     var parent = new NBehaveScenarioTestElement("scenario title", ResharperStubs.StubFeatureFile(), null, null, parentParent);
     var p = new NBehaveStepTestElement("Given something", featureFile, null, null, parent);
     Assert.AreEqual(p, p);
 }
Exemple #3
0
 private void BuildSteps(IEnumerable <StringStep> steps)
 {
     foreach (var step in steps)
     {
         var s = new NBehaveStepTestElement(step.Step, _parent.FeatureFile, _unitTestProvider, _projectModel, _parent);
         Add(s);
     }
 }
 public bool Equals(NBehaveStepTestElement other)
 {
     if (other == null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && Equals(other._step, _step));
 }
        public void Should_consider_different_instances_with_same_title_equal()
        {
            var featureFileA = ResharperStubs.StubFeatureFile();
            var parentParentA = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
            var parentA = new NBehaveScenarioTestElement("scenario title", ResharperStubs.StubFeatureFile(), null, null, parentParentA);
            var a = new NBehaveStepTestElement("Given something", featureFileA, null, null, parentA);

            var featureFileB = ResharperStubs.StubFeatureFile();
            var parentParentB = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
            var parentB = new NBehaveScenarioTestElement("scenario title", ResharperStubs.StubFeatureFile(), null, null, parentParentB);
            var b = new NBehaveStepTestElement("Given something", featureFileB, null, null, parentB);
            Assert.AreEqual(a, b);
        }
Exemple #6
0
 private void PresentStep(NBehaveStepTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
 }
 private void PresentStep(NBehaveStepTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
 }
Exemple #8
0
 private void BuildSteps(IEnumerable<StringStep> steps)
 {
     foreach (var step in steps)
     {
         var s = new NBehaveStepTestElement(step.Step, _parent.FeatureFile, _unitTestProvider, _projectModel, _parent);
         Add(s);
     }
 }