9using System.Collections.Generic;
14using Microsoft.VisualStudio.TestTools.UnitTesting;
19using TestClass = NUnit.Framework.TestFixtureAttribute;
20using TestInitialize = NUnit.Framework.SetUpAttribute;
21using TestCleanup = NUnit.Framework.TearDownAttribute;
22using TestMethod = NUnit.Framework.TestAttribute;
32#pragma warning disable CS0414
33 private string _f1 =
"private";
34#pragma warning restore CS0414
35 public string _f2 =
"public";
41 var instance =
new Test1();
42 var expected =
"private";
44 Assert.AreEqual(expected, actual);
50 var instance =
new Test1();
51 var expected =
"success";
54 Assert.AreEqual(expected, actual);
60 var instance =
new Test1();
61 var expected =
"public";
63 Assert.AreEqual(expected, actual);
69 var instance =
new Test1();
73 var actual = instance._f2;
74 Assert.AreEqual(expected, actual);
void PublicFieldSetSuccess()
void PrivateFieldSetFail()
void PublicFieldGetSuccess()
void PrivateFieldGetSuccess()