public void ShouldCreatedAnInstanceOfServiceReporter() {
   var factory = new ServiceReporterFactory();
   var options = new Dictionary<string, string> {
     {ServiceReporterFactory.kServerEndpoint, "tcp://127.0.0.1:8520"},
   };
   var reporter = factory.CreatePollingReporter(options);
   Assert.That(reporter, Is.AssignableTo<ServiceReporter>());
 }
 public void ShouldCreateAnInstanceOfDynamicReporter() {
   var host = Mock.Create<IRubyServiceHost>();
   var factory = new ServiceReporterFactory(host);
   var options = new Dictionary<string, string> {
     {ServiceReporterFactory.kServerEndpoint, "tcp://127.0.0.1:8520"},
   };
   var reporter = factory.CreatePollingReporter(options);
   Assert.That(reporter, Is.AssignableTo<DynamicServiceReporter>());
 }
Beispiel #3
0
        public void ShouldCreatedAnInstanceOfServiceReporter()
        {
            var factory = new ServiceReporterFactory();
            var options = new Dictionary <string, string> {
                { ServiceReporterFactory.kServerEndpoint, "tcp://127.0.0.1:8520" },
            };
            var reporter = factory.CreatePollingReporter(options);

            Assert.That(reporter, Is.AssignableTo <ServiceReporter>());
        }
Beispiel #4
0
        public void ShouldCreateAnInstanceOfDynamicReporter()
        {
            var host    = Mock.Create <IRubyServiceHost>();
            var factory = new ServiceReporterFactory(host);
            var options = new Dictionary <string, string> {
                { ServiceReporterFactory.kServerEndpoint, "tcp://127.0.0.1:8520" },
            };
            var reporter = factory.CreatePollingReporter(options);

            Assert.That(reporter, Is.AssignableTo <DynamicServiceReporter>());
        }
 public void ShouldThrowExceptionWhenRequiredOptionIsMissing() {
   var factory = new ServiceReporterFactory();
   var options = new Dictionary<string, string>();
   try {
     var reporter = factory.CreatePollingReporter(options);
   } catch(Exception e) {
     Assert.Pass("Exception was throwed");
     return;
   }
   Assert.Fail("Exception was not throwed");
 }
Beispiel #6
0
        public void ShouldThrowExceptionWhenRequiredOptionIsMissing()
        {
            var factory = new ServiceReporterFactory();
            var options = new Dictionary <string, string>();

            try {
                var reporter = factory.CreatePollingReporter(options);
            } catch (Exception e) {
                Assert.Pass("Exception was throwed");
                return;
            }
            Assert.Fail("Exception was not throwed");
        }