Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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);
   }
 }
Ejemplo n.º 3
0
 public void PositiveStructCtorWithClosure6() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("Hello", "Hello");
 }
Ejemplo n.º 4
0
 public void PositiveStructCtorWithClosure5() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("Hello", new[] { "Foo", "Bar", "Hello" });
 }
Ejemplo n.º 5
0
 public void PositiveStructCtorWithClosure4() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors(new object(), false);
 }
Ejemplo n.º 6
0
 public void PositiveStructCtorWithClosure3() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors("hello", true);
 }
Ejemplo n.º 7
0
 public void PositiveStructCtorWithClosure2() {
   var c = new CodeUnderTest.ConstructorsWithClosures.StructCtors(new Object());
 }