public void IgnoredConstructors_skips_testing_constructor() { var sut = new ClassTester(new TestTypeWBadProperty()); sut.IgnoredConstructors.Add(new MethodSignature(typeof(ClassTester))); sut.TestConstructors(true); }
public void Simple_stuff_works() { var tester = new ClassTester(new MethodSignature(typeof(int), typeof(string))); tester.IgnoredConstructors.Add(new MethodSignature(typeof(ParameterInfo[]))); tester.TestConstructors(); tester.TestProperties(); }
public void Properties_work() { var classTester = new ClassTester(new TransitionDetails <SaleState, SaleEvent>("test" , new StateDetails <SaleState, SaleEvent>(SaleState.Open) , SaleEvent.AddItem)); classTester.TestConstructors(); //classTester.TestEquality(); classTester.TestProperties(); }
public void TestConstructorWithTestMappedProperties_throws_exception_if_property_not_set() { var sut = new ClassTester(new TestTypeWInvalidPropertySetter()); Assert.Throws <InvalidOperationException>(() => sut.TestConstructors(testMappedProperties: true)); }