public void Should_consider_same_instance_equal()
 {
     var featureFile = ResharperStubs.StubFeatureFile();
     var parent = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
     var p = new NBehaveScenarioTestElement("scenario title", featureFile, null, null, parent);
     Assert.AreEqual(p, p);
 }
 public void Should_not_consider_scenario_and_background_equal()
 {
     var featureFile = ResharperStubs.StubFeatureFile();
     var parent = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
     var p1 = new NBehaveScenarioTestElement("scenario title", featureFile, null, null, parent);
     var p = new NBehaveBackgroundTestElement("scenario title", featureFile, null, null, p1);
     Assert.AreNotEqual(p1, p);
     Assert.AreNotEqual(p, p1);
 }
        public void Should_consider_different_instances_with_same_title_equal()
        {
            var featureFileA = ResharperStubs.StubFeatureFile();
            var parentA = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
            var a = new NBehaveScenarioTestElement("scenario title", featureFileA, null, null, parentA);

            var parentB = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
            var featureFileB = ResharperStubs.StubFeatureFile();
            var b = new NBehaveScenarioTestElement("scenario title", featureFileB, null, null, parentB);
            Assert.AreEqual(a, b);
        }
 private void PresentScenario(NBehaveScenarioTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
 }
 private bool Equals(NBehaveScenarioTestElement other)
 {
     if (other == null)
         return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && Equals(other._scenario, _scenario);
 }