Пример #1
0
 public void NegativeStructCtorWithClosure4() {
   try {
     var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("Hello", new[] { "A", "b", "D" });
     throw new Exception("Expected failure did not happen");
   } catch (TestRewriterMethods.PostconditionException a) {
     Assert.AreEqual(": Contract.Exists(0, data.Length, i => data[i] == (encoder as string))", a.Message);
   }
 }
Пример #2
0
 public void NegativeStructCtorWithClosure5() {
   try {
     var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors(null, (string)null);
     throw new Exception("Expected failure did not happen");
   } catch (ArgumentException a) {
     Assert.AreEqual("Precondition failed: encoder != null", a.Message);
   }
 }
Пример #3
0
 public void PositiveStructCtorWithClosure6() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("Hello", "Hello");
 }
Пример #4
0
 public void PositiveStructCtorWithClosure5() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("Hello", new[] { "Foo", "Bar", "Hello" });
 }
Пример #5
0
 public void PositiveStructCtorWithClosure4() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors(new object(), false);
 }
Пример #6
0
 public void PositiveStructCtorWithClosure3() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("hello", true);
 }
Пример #7
0
 public void PositiveStructCtorWithClosure2() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors(new Object());
 }