Ejemplo n.º 1
0
    public void TestStructWithPrivateFields()
    {
        var structWithPrivateFields = new StructWithPrivateFields(10, new Foo {
            A = 5
        });

        Assert.AreEqual(10, structWithPrivateFields.SimplePrivateField);
        Assert.AreEqual(5, structWithPrivateFields.ComplexPrivateField.A);
    }
Ejemplo n.º 2
0
 public void TestStructWithPrivateFields()
 {
     var structWithPrivateFields = new StructWithPrivateFields(10, new Foo { A = 5 });
     Assert.AreEqual(10, structWithPrivateFields.SimplePrivateField);
     Assert.AreEqual(5, structWithPrivateFields.ComplexPrivateField.A);
 }
Ejemplo n.º 3
0
 public bool Equals(StructWithPrivateFields other)
 {
     return(A == other.A && B == other.B);
 }