3 using Microsoft.VisualStudio.TestTools.UnitTesting;
7 namespace Sage.
ES.S50.UnitTest.addons.idatos
13 private TestContext testContextInstance;
19 public TestContext TestContext
23 return testContextInstance;
27 testContextInstance = value;
35 private PrivateObject obj;
48 testContext.__Test_LoadRandomConfig();
55 obj =
new PrivateObject(_ImportArticulos);
61 [Owner(Owners.Luisa_Galvan), TestMethod()]
63 [DataRow(
"D_ALBCOM",
"ART1",
false)]
64 [DataRow(
"C_PROD",
"ART1",
false)]
69 bool result = (bool)obj.Invoke(
"ExisteMovimientosArticulo",
new object[] { tabla, articulo });
72 Assert.IsTrue(!expected, $
"Existe movimentos del artículo {articulo} en la tabla {tabla}");
76 Assert.AreEqual(result, expected, $
"Se esperaba un {expected}");
81 Assert.Fail($
"Excepción lanzada que no se esperaba. {e.Message}");
void MovimientosArticuloTest(string tabla, string articulo, bool expected)
static void MyClassInitialize(TestContext testContext)