/// <summary> /// Initialize a new instance of the <see cref="T:Kuzzle.Kuzzle"/> class. /// </summary> public Kuzzle( AbstractProtocol networkProtocol, int refreshedTokenDuration = 3600000, int minTokenDuration = 3600000, int maxQueueSize = -1, int maxRequestDelay = 1000, bool autoRecover = false, Func <JObject, bool> queueFilter = null ) { NetworkProtocol = networkProtocol; NetworkProtocol.ResponseEvent += ResponsesListener; NetworkProtocol.StateChanged += StateChangeListener; EventHandler = new KuzzleEventHandler(this); // Initializes the controllers Auth = new AuthController(this); Collection = new CollectionController(this); Document = new DocumentController(this); Index = new IndexController(this); Realtime = new RealtimeController(this); Server = new ServerController(this); Bulk = new BulkController(this); Admin = new AdminController(this); Offline = new OfflineManager(networkProtocol, this) { RefreshedTokenDuration = refreshedTokenDuration, MinTokenDuration = minTokenDuration, MaxQueueSize = maxQueueSize, MaxRequestDelay = maxRequestDelay, QueueFilter = queueFilter, AutoRecover = autoRecover }; // Initializes instance unique properties Version = typeof(Kuzzle) .GetTypeInfo() .Assembly .GetName() .Version .ToString(); InstanceId = Guid.NewGuid().ToString(); SdkName = $"csharp@{Version}"; }
public BulkControllerTest() { _api = new KuzzleApiMock(); _bulkController = new BulkController(_api.MockedObject); }