1234567891011121314151617181920212223242526272829303132333435 |
- DebugAndTrace.testing(OrganizationsADD.add_org, OrganizationsUPD.upd_org, ServADD.add_add, ServUPD.upd_add,InternetADD.add_internet, InernetUPD.upd_internet, SubscriptionFeeADD.add_fee, SubscriptionFeeUPF.upd_fee);
- public int razmer = 0;
- public static string[] add_org = new string[1];
- add_org[razmer] = textBox1.Text;
- Array.Resize(ref add_org, add_org.Length + 1);
- razmer++;
- public static void testing(string[] add_org, string[] upd_org, string[] add_add, string[] upd_add, string[] add_internet, string[] upd_internet, string[] add_fee, string[] upd_fee)
- {
- Trace.Listeners.Add(new TextWriterTraceListener("Debug.txt"));
- Debug.Indent();
- Trace.Indent();
- if (add_org[0] != null)
- {
- Debug.WriteLine("Пользователь добавил в БД организацию:");
- for (int i = 0; i < add_org.Length - 1; i++)
- {
- Debug.WriteLine(i + 1 + ") " + add_org[i]);
- }
- }
- Debug.WriteLine("");
- Trace.Flush();
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void test1_2_2_4()
- {
- double a = 2;
- double b = 2;
- double expected = 4;
- CalculetionForm c = new CalculetionForm();
- double act = c.summ2(a, b);
- Assert.AreEqual(expected, act);
- }
|