public void TestProperties_BadPropertySkippedLambda()
 {
     var subject = new DummyBadProperty();
     var tester = new PropertyTester(subject);
     tester.AddIgnoredProperty(() => subject.SomeString);
     tester.TestProperties();
 }
Exemple #2
0
        public void ChecaPropriedades()
        {
            var propertyTester = new PropertyTester(new T());

            this.IgnorePropertiesOfCollectionType(propertyTester);
            propertyTester.TestProperties();
        }
Exemple #3
0
        public void Properties_work()
        {
            var tester = new PropertyTester(new TransitionDetails <SaleState, SaleEvent>("test"
                                                                                         , new StateDetails <SaleState, SaleEvent>(SaleState.Open)
                                                                                         , SaleEvent.AddItem));

            tester.TestProperties();
        }
 public void TestProperties_NoEventSkippedLambda()
 {
     var subject = new DummyNoEvent();
     var tester = new PropertyTester(subject);
     tester.AddIgnoredProperty(() => subject.SomeInt);
     tester.TestProperties();
 }
 public void TestProperties_NoEventSkipped()
 {
     var tester = new PropertyTester(new DummyNoEvent());
     tester.IgnoredProperties.Add("SomeInt");
     tester.TestProperties();
 }
 public void TestProperties_NoEvent()
 {
     var tester = new PropertyTester(new DummyNoEvent());
     tester.TestProperties();
 }
 public void TestProperties_GenericClass()
 {
     var tester = new PropertyTester(new DummyGeneric<int, int?, List<string>, string>());
     tester.TestProperties();
 }
 public void TestProperties_CannotGenerateTwoDifferentValues()
 {
     var tester = new PropertyTester(new DummyUsesSameEquals());
     tester.TestProperties();
 }
 public void TestProperties_BadPropertySkipped()
 {
     var tester = new PropertyTester(new DummyBadProperty());
     tester.IgnoredProperties.Add("SomeString");
     tester.TestProperties();
 }
 public void TestProperties_BadProperty()
 {
     var tester = new PropertyTester(new DummyBadProperty());
     tester.TestProperties();
 }
        public void TestProperties_UsingMock()
        {
            var repository = new MockRepository();
            var mock = repository.DynamicMock<IBasicProperties>();

            Expect.Call(mock.GetSetProperty).Return("one");
            Expect.Call(mock.GetOnlyProperty).Return("anyoldthing");
            mock.SetOnlyProperty = "two";

            repository.Replay(mock);

            var typeFactory = new CustomStringTypeFactory();
            typeFactory.ReturnValues.Enqueue("one");
            typeFactory.ReturnValues.Enqueue("two");

            var tester = new PropertyTester(mock, typeFactory);
            tester.IgnoredProperties.Add("ConstructorArguments");
            tester.TestProperties();
            repository.Verify(mock);
        }
 public void TestProperties_Self()
 {
     var tester = new PropertyTester(new PropertyTester(new object()));
     tester.TestProperties();
 }
 public void TestProperties_Pass()
 {
     var tester = new PropertyTester(new DummyGood());
     tester.TestProperties();
 }