Commit fb65eb77 authored by Adrian Ramcharitar's avatar Adrian Ramcharitar

Added test case

parent b288b487
Pipeline #56588137 passed with stages
in 7 minutes and 43 seconds
......@@ -75,6 +75,21 @@ namespace Foci.Orbital.Agent.Tests.Services
Assert.Throws<ArgumentNullException>(() => new ServiceDefinitionService(subConfiguration, subBusService, null, operationsHandler));
}
[Fact]
[Trait("Category", "Failure")]
public void DefinitionServiceNullOperationsHandler()
{
#region Substitutions
IConfigurationService subConfiguration = Substitute.For<IConfigurationService>();
IBusService subBusService = Substitute.For<IBusService>();
IServiceDefinitionRepository serviceDefinitionRepository = Substitute.For<IServiceDefinitionRepository>();
#endregion
Assert.Throws<ArgumentNullException>(() => new ServiceDefinitionService(subConfiguration, subBusService, serviceDefinitionRepository, null));
}
/// <summary>
/// Bootstraps SubscriberDetails to Rabbit MQ.
/// </summary>
......@@ -253,6 +268,7 @@ namespace Foci.Orbital.Agent.Tests.Services
subConfiguration.GetConfigurationProperties().Returns(config);
subBusService.BootstrapService(Arg.Any<BusConnectionDetails>(), Arg.Any<SubscriberDetails[]>()).Returns(subBus);
#endregion
......@@ -261,6 +277,14 @@ namespace Foci.Orbital.Agent.Tests.Services
Assert.Throws<ArgumentException>(() => Target.BootStrapSubscriberDetails(null, Input.Details));
}
[Fact]
[Trait("Category", "Failure")]
public void operationHnadlerFailed()
{
}
/// <summary>
/// Registers services with them all failing to load. Application continues to live.
/// </summary>
......@@ -414,6 +438,7 @@ namespace Foci.Orbital.Agent.Tests.Services
Actual.Select(s => s.RegisteredServices.Count()));
Assert.Equal(Expected.Select(s => s.ServiceName),
Actual.Select(s => s.ServiceName));
}
/// <summary>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment