public WarehouseTestEnvironment AddLighthouseRuntime() { if (LighthouseServer == null) { LighthouseServer = new LighthouseServer(WriteLine, workingDirectory: @"C:\Development\warehouse\"); LighthouseServer.Start(); Log($"Starting lighthouse server {LighthouseServer}."); } return(this); }
public void Start_StartsUpCorrectly() { var lighthouse = new LighthouseServer(Output.WriteLine); lighthouse.Start(); var server = new WarehouseServer(); server.StatusUpdated += Server_StatusUpdated; server.Initialize(lighthouse); server.Start(); server.RunState.Should().Be(LighthouseServiceRunState.Running); }
public void StoreAndRetrieve_ReturnsDataCorrectly() { var lighthouseServer = new LighthouseServer(Output.WriteLine); lighthouseServer.Start(); var warehouseServer = new WarehouseServer(); // bind the warehouserServer to the lighthouseServer lighthouseServer.Launch(warehouseServer); var key = new WarehouseKey("testData", StorageScope.Global); // get a shelf that can hold data for the duration of the session var payload = new[] { "data" }; warehouseServer.Store(key, payload, new[] { LoadingDockPolicy.Ephemeral }); var retrievedValues = warehouseServer.Retrieve <string>(key); payload.Should().BeEquivalentTo(payload); }