DB.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. 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);
  2. public int razmer = 0;
  3. public static string[] add_org = new string[1];
  4. add_org[razmer] = textBox1.Text;
  5. Array.Resize(ref add_org, add_org.Length + 1);
  6. razmer++;
  7. 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)
  8. {
  9. Trace.Listeners.Add(new TextWriterTraceListener("Debug.txt"));
  10. Debug.Indent();
  11. Trace.Indent();
  12. if (add_org[0] != null)
  13. {
  14. Debug.WriteLine("Пользователь добавил в БД организацию:");
  15. for (int i = 0; i < add_org.Length - 1; i++)
  16. {
  17. Debug.WriteLine(i + 1 + ") " + add_org[i]);
  18. }
  19. }
  20. Debug.WriteLine("");
  21. Trace.Flush();
  22. [TestClass]
  23. public class UnitTest1
  24. {
  25. [TestMethod]
  26. public void test1_2_2_4()
  27. {
  28. double a = 2;
  29. double b = 2;
  30. double expected = 4;
  31. CalculetionForm c = new CalculetionForm();
  32. double act = c.summ2(a, b);
  33. Assert.AreEqual(expected, act);
  34. }