예제 #1
0
 public void WithConstructor_NotANewExpressionSupplied_Throws()
 {
     {
         var myClass = new MyClassWithConstructor(1, 2);
         Assert.Throws <ArgumentException>(() => myClassWithConstructorBuilder.WithConstructor(() => myClass));
     }
 }
예제 #2
0
        public void WithConstructor_NotANewExpressionSupplied_Throws()
        {
            using (mocks.Record())
            {}

            using (mocks.Playback())
            {
                // TODO FIX
                #if !SILVERLIGHT
                var myClass = new MyClassWithConstructor(1, 2);
                Assert.Throws <ArgumentException>(() => myClassWithConstructorBuilder.WithConstructor(() => myClass));
                #endif
            }
        }