public void Create()
 {
     var mds = new Mds(1,2);
     Assert.Equal(1, mds.incoming );
     Assert.Equal(0, mds.content.Length);
     Assert.Equal(2, mds.outgoing );
 }
 public void Invert()
 {
     var mds = new Mds(1,5, new [] {2,3,4}).Invert();
     Assert.Equal( new [] {-4,-3,-2}, mds.content );
     Assert.Equal(-5, mds.incoming);
     Assert.Equal(-1, mds.outgoing );
 }
 public bool Equals(Mds other)
 {
     if(In!=other.In||Out!=other.Out) return false;
     if(Content.Length!=other.Content.Length) return false;
     for(var i=0; i<Content.Length; i++) {
         if(Content[i]!=other.Content[i]) {
             return false;
         }
     }
     return true;
 }
Beispiel #4
0
 public bool Equals(Mds other)
 {
     if (In != other.In || Out != other.Out)
     {
         return(false);
     }
     if (Content.Length != other.Content.Length)
     {
         return(false);
     }
     for (var i = 0; i < Content.Length; i++)
     {
         if (Content[i] != other.Content[i])
         {
             return(false);
         }
     }
     return(true);
 }
 public void TestEquals()
 {
     var a = new Mds(1,2);
     var b = new Mds(1,2);
     Assert.True( a.Equals(b), "Equal MDS:s dont match" );
 }