예제 #1
0
 public bool Equals(FakeSettings other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.Name, Name) && Equals(other.Hometown, Hometown));
 }
예제 #2
0
        public void visit_to_get_customizatinos()
        {
            var settings1 = new AppSettings();
            var settings2 = new FakeSettings();

            theSettings.Replace(settings1);
            theSettings.Replace(settings2);

            var visitor = MockRepository.GenerateMock <Action <Type, object> >();

            theSettings.ForAllSettings(visitor);

            visitor.AssertWasCalled(x => x.Invoke(typeof(AppSettings), settings1));
            visitor.AssertWasCalled(x => x.Invoke(typeof(FakeSettings), settings2));
        }
예제 #3
0
 public bool Equals(FakeSettings other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Name, Name) && Equals(other.Hometown, Hometown);
 }
        public void visit_to_get_customizatinos()
        {
            var settings1 = new AppSettings();
            var settings2 = new FakeSettings();

            theSettings.Replace(settings1);
            theSettings.Replace(settings2);

            var visitor = MockRepository.GenerateMock<Action<Type, object>>();

            theSettings.ForAllSettings(visitor);

            visitor.AssertWasCalled(x => x.Invoke(typeof(AppSettings), settings1));
            visitor.AssertWasCalled(x => x.Invoke(typeof(FakeSettings),settings2));
        }