コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 private bool Equals(NBehaveScenarioTestElement other)
 {
     if (other == null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && Equals(other._scenario, _scenario));
 }
コード例 #5
0
 private void PresentScenario(NBehaveScenarioTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
 }
コード例 #6
0
 private void PresentScenario(NBehaveScenarioTestElement value, IPresentableItem item, TreeModelNode modelNode, PresentationState state)
 {
 }
コード例 #7
0
 private bool Equals(NBehaveScenarioTestElement other)
 {
     if (other == null)
         return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && Equals(other._scenario, _scenario);
 }