public void EnsureThatReturnFalseIfInvalidCall()
            {
                var publisher = new ReportPortalPublisher(A.Dummy <IConfiguration>());

                bool res = publisher.StartLaunch(_launchName, Mode.Debug, "tag1;tag2");

                Assert.IsFalse(res);
            }
            public void ItShouldBeEmptyInAColdStart()
            {
                var publisher = new ReportPortalPublisher(A.Dummy <IConfiguration>());

                var res = publisher.GetLastError();

                Assert.IsEmpty(res);
            }
            public void ItShouldReportAnErrorWithInvalidParameters()
            {
                var publisher = new ReportPortalPublisher(A.Dummy <IConfiguration>());

                publisher.StartLaunch(_launchName, Mode.Debug, "tag1;tag2");

                string res = publisher.GetLastError();

                Assert.That(res, Is.Not.EqualTo("success").And.Not.Empty);
            }
Beispiel #4
0
        public static RpProxy CreateValidPortal()
        {
            var config = A.Fake <IConfiguration>();

            A.CallTo(() => config.ServerUrl).Returns("https://rp.epam.com/api/v1/");
            A.CallTo(() => config.ServerProjectName).Returns("default_project");
            A.CallTo(() => config.ServerPassword).Returns("7853c7a9-7f27-43ea-835a-cab01355fd17");

            var publisher = new ReportPortalPublisher(config);

            publisher.Init();

            return(new RpProxy()
            {
                Publisher = publisher
            });
        }
 public void Setup()
 {
     _config    = A.Fake <IConfiguration>();
     _publisher = new ReportPortalPublisher(_config);
 }
Beispiel #6
0
 public void Reset()
 {
     Publisher = null;
 }