public void Should_consider_same_instance_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.AreEqual(p, p);
 }
Ejemplo n.º 2
0
 private bool Equals(NBehaveBackgroundTestElement other)
 {
     if (other == null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && Equals(other._scenario, _scenario));
 }
        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 a1 = new NBehaveScenarioTestElement("scenario title", featureFileA, null, null, parentA);
            var a = new NBehaveBackgroundTestElement("scenario title", featureFileA, null, null, a1);

            var parentB = new NBehaveFeatureTestElement("feature title", ResharperStubs.StubFeatureFile(), null, null);
            var featureFileB = ResharperStubs.StubFeatureFile();
            var b1 = new NBehaveScenarioTestElement("scenario title", featureFileB, null, null, parentB);
            var b = new NBehaveBackgroundTestElement("scenario title", featureFileB, null, null, b1);
            Assert.AreEqual(a, b);
        }
Ejemplo n.º 4
0
 private void PresentBackgroundScenario(NBehaveBackgroundTestElement value, IPresentableItem item, TreeModelNode structureelement, PresentationState state)
 {
 }
Ejemplo n.º 5
0
 private void PresentBackgroundScenario(NBehaveBackgroundTestElement value, IPresentableItem item, TreeModelNode structureelement, PresentationState state)
 {
 }
 private bool Equals(NBehaveBackgroundTestElement other)
 {
     if (other == null)
         return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && Equals(other._scenario, _scenario);
 }