public void CreateCollectionTest() { var legacyClientFactory = MockRepository.GenerateStub <ILegacyClientFactory>(); legacyClientFactory.Stub(x => x.Create()).Return(new LegacyClient()); var builder = new ClientFactory { LegacyClientFactory = legacyClientFactory }; var result1 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Path, Name = "Client 1", Path = @"\\test\path1\" }; var result2 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Http, Name = "Client 2", Path = @"\\test\path2\" }; var result3 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Ftp }; var instances = builder.CreateCollection(new[] { result1, result2, result3 }); Assert.AreEqual(2, instances.Count()); }
public void CreateCollectionTest() { var builder = new ClientFactory(); var result1 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Path, Name = "Client 1", Path = @"\\test\path1\" }; var result2 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Http, Name = "Client 2", Path = @"\\test\path2\" }; var result3 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Ftp }; var instances = builder.CreateCollection(new[] { result1, result2, result3 }); Assert.AreEqual(2, instances.Count()); }
public void CreateCollectionTest() { var legacyClientFactory = MockRepository.GenerateStub<ILegacyClientFactory>(); legacyClientFactory.Stub(x => x.Create()).Return(new LegacyClient()); var builder = new ClientFactory { LegacyClientFactory = legacyClientFactory }; var result1 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Path, Name = "Client 1", Path = @"\\test\path1\" }; var result2 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Http, Name = "Client 2", Path = @"\\test\path2\" }; var result3 = new ClientSettings(ClientType.Legacy) { LegacyClientSubType = LegacyClientSubType.Ftp }; var instances = builder.CreateCollection(new[] { result1, result2, result3 }); Assert.AreEqual(2, instances.Count()); }
public void CreateCollectionArgumentNullTest() { var builder = new ClientFactory(); Assert.Throws<ArgumentNullException>(() => builder.CreateCollection((null))); }
public void CreateCollectionArgumentNullTest() { var builder = new ClientFactory(); builder.CreateCollection((null)); }
public void CreateCollectionArgumentNullTest() { var builder = new ClientFactory(); Assert.Throws <ArgumentNullException>(() => builder.CreateCollection((null))); }