public void ProteinBenchmarkService_GetBenchmarkProjects_ForSpecificSlot() { // Arrange using (var artifacts = new ArtifactFolder()) { var container = CreateTestDataContainer(artifacts.GetRandomFilePath()); var benchmarkService = new ProteinBenchmarkService(container); // Act var projects = benchmarkService.GetBenchmarkProjects(benchmarkService.GetSlotIdentifiers().First()); // Assert Assert.AreEqual(45, projects.Count); } }
public void ProteinBenchmarkService_RemoveAll_ForSpecificSlot() { // Arrange using (var artifacts = new ArtifactFolder()) { var container = CreateTestDataContainer(artifacts.GetRandomFilePath()); var benchmarkService = new ProteinBenchmarkService(container); // Act benchmarkService.RemoveAll(benchmarkService.GetSlotIdentifiers().First()); // Assert Assert.AreEqual(647, container.Data.Count); } }
public void ProteinBenchmarkService_GetSlotIdentifiers_ReturnsDistinctValuesFromAllBenchmarks() { // Arrange using (var artifacts = new ArtifactFolder()) { var container = CreateTestDataContainer(artifacts.GetRandomFilePath()); var benchmarkService = new ProteinBenchmarkService(container); // Act var identifiers = benchmarkService.GetSlotIdentifiers(); // Assert Assert.AreEqual(11, identifiers.Count); } }
public void ProteinBenchmarkService_GetSlotIdentifiers_ReturnsDistinctValuesWithGuidFromBenchmarksWithAndWithoutSourceGuid() { // Arrange var container = new ProteinBenchmarkDataContainer(); container.Data.Add(new ProteinBenchmark { SourceName = "Foo", SourcePath = "192.168.1.255:36330", SourceGuid = Guid.Empty, SourceSlotID = 0 }); container.Data.Add(new ProteinBenchmark { SourceName = "Foo", SourcePath = "192.168.1.255:36330", SourceGuid = Guid.NewGuid(), SourceSlotID = 0 }); var benchmarkService = new ProteinBenchmarkService(container); // Act var identifiers = benchmarkService.GetSlotIdentifiers(); // Assert Assert.AreEqual(1, identifiers.Count); Assert.IsTrue(identifiers.First().ClientIdentifier.HasGuid); }