public void GetRandomGenerator_When_T_Is_ISymmetricMatrix() { //Arrange var provider = new NetworkToolProvider(); //Act var factory = provider.GetRandomGenerator<ISymmetricMatrix<double>>(); //Assert Assert.NotNull(factory); Assert.IsType<RandomGeneratorMatrix<double>>(factory); }
internal INetwork CreateNetwork(Guid id, IRandomNetGenParamMgr paramMgr) { INetwork net = null; using (var toolProvider = new NetworkToolProvider()) { using (var rgg = toolProvider.GetRandomGenerator<IBasicAdjList>()) { rgg.NodeCount = paramMgr.NodeCount; rgg.EdgeCount = paramMgr.EdgeCount; rgg.IsDirected = paramMgr.IsDirected; net = rgg.Generate(id); net.Name = paramMgr.NetworkName; } } return net; }
public void GetRandomGenerator_When_T_Is_IBasicAdjList() { //Arrange var provider = new NetworkToolProvider(); //Act var factory = provider.GetRandomGenerator<IBasicAdjList>(); Assert.NotNull(factory); Assert.IsType<RandomGeneratorBasicAdjList>(factory); }