public void CreateNamedInstance_InvalidOptions_ArgumentException() { Assert.ThrowsException <ArgumentNullException>(() => { OpenTsdbFactory.Instance(null, "test"); }); }
public void CreateNamedInstance_InvalidName_ArgumentException(string nameInput) { Assert.ThrowsException <ArgumentException>(() => { OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost"), nameInput); }); }
public void CreateNamedInstance_DuplicateName_SameInstanceReturned() { var originalInstance = OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost"), "test"); var secondInstance = OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost"), "test"); Assert.AreSame(originalInstance, secondInstance); }
public void SubmitSinglePointData() { var pushResult = OpenTsdbFactory .Instance(TsdbOptions.New(_openTsdbUrl)) .PushAsync("ping", new Random().Next()); Assert.AreEqual(pushResult.Result.ResponseHttpStatusCode, 204); }
public void IsNamedDefined_ExistingName_True() { OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost"), "test"); Assert.IsTrue(OpenTsdbFactory.IsInstanceDefined("test")); }
public void CreateNamedInstance_ValidOptions_InstanceCreated() { var manager = OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost"), "test"); Assert.IsNotNull(manager); }