diff --git a/dopt.DeltaBarth.Tests/PluginTest.cs b/dopt.DeltaBarth.Tests/PluginTest.cs index 47baf18..3f0f1ee 100644 --- a/dopt.DeltaBarth.Tests/PluginTest.cs +++ b/dopt.DeltaBarth.Tests/PluginTest.cs @@ -182,6 +182,18 @@ namespace dopt.DeltaBarth.Tests test.Dispose(); } [TestMethod] + public void Umsatzprognose_WithCompanyIdWithoutDate_Test_FailConnection() + { + var test = new TPlugin(); + string apiUrlSet = config.apiUrl, user = config.username, password = config.password, database = config.database, mandant = config.mandant; + test.Startup(baseDataPath, apiUrlSet, user, password, database, mandant); + var comp_id = 1024; + var res = test.Umsatzprognose(comp_id, null); + Assert.AreEqual(1, res.status.code); + PrettyPrint(res); + test.Dispose(); + } + [TestMethod] [TestCategory("ActiveAPI")] public void Umsatzprognose_WithoutCompanyIdWithInvalidDate_Test() { @@ -195,6 +207,18 @@ namespace dopt.DeltaBarth.Tests test.Dispose(); } [TestMethod] + public void Umsatzprognose_WithoutCompanyIdWithInvalidDate_Test_FailConnection() + { + var test = new TPlugin(); + string apiUrlSet = config.apiUrl, user = config.username, password = config.password, database = config.database, mandant = config.mandant; + test.Startup(baseDataPath, apiUrlSet, user, password, database, mandant); + var date = new DateTime(2030, 1, 1, 12, 45, 30); + var res = test.Umsatzprognose(null, date); + Assert.AreEqual(1, res.status.code); + PrettyPrint(res); + test.Dispose(); + } + [TestMethod] [TestCategory("ActiveAPI")] public void Umsatzprognose_WithoutCompanyIdWithValidDate_Test() { @@ -207,5 +231,17 @@ namespace dopt.DeltaBarth.Tests PrettyPrint(res); test.Dispose(); } + [TestMethod] + public void Umsatzprognose_WithoutCompanyIdWithValidDate_Test_FailConnection() + { + var test = new TPlugin(); + string apiUrlSet = config.apiUrl, user = config.username, password = config.password, database = config.database, mandant = config.mandant; + test.Startup(baseDataPath, apiUrlSet, user, password, database, mandant); + var date = new DateTime(2015, 1, 1, 12, 45, 30); + var res = test.Umsatzprognose(null, date); + Assert.AreEqual(1, res.status.code); + PrettyPrint(res); + test.Dispose(); + } } }