public void Test_09_SearchUri_3_ReverseRangeOrder() { string Uri = "iotdisco:A=1;B>1;C<1;D>=1;E<=1;F<>1;G<2;G>1;H<2;H>=1;I<=2;I>1;J<=2;J>=1;K<2;K>3;L<2;L>=3;M<=2;M>3;N<=2;N>=3;O~+1+2"; Assert.IsFalse(ThingRegistryClient.IsIoTDiscoClaimURI(Uri)); Assert.IsTrue(ThingRegistryClient.IsIoTDiscoSearchURI(Uri)); IEnumerable <SearchOperator> Operators = ThingRegistryClient.DecodeIoTDiscoURI(Uri); this.Test_SearchUri_3(Operators); }
public void Test_05_SearchUri_1_ReverseRangeOrder() { string Uri = "iotdisco:MAN=www.example.org;MODEL=Device;SN~*9873*;#V<2;#V>=1.0;#LON<=-70;#LON>=-72;#LAT<=-33;#LAT>=-34"; Assert.IsFalse(ThingRegistryClient.IsIoTDiscoClaimURI(Uri)); Assert.IsTrue(ThingRegistryClient.IsIoTDiscoSearchURI(Uri)); IEnumerable <SearchOperator> Operators = ThingRegistryClient.DecodeIoTDiscoURI(Uri); this.Test_SearchUri_1(Operators); }
public void Test_07_SearchUri_2_ReverseRangeOrder() { string Uri = "iotdisco:#A=1;#B>1;#C<1;#D>=1;#E<=1;#F<>1;#G<2;#G>1;#H<2;#H>=1;#I<=2;#I>1;#J<=2;#J>=1;#K<2;#K>3;#L<2;#L>=3;#M<=2;#M>3;#N<=2;#N>=3"; Assert.IsFalse(ThingRegistryClient.IsIoTDiscoClaimURI(Uri)); Assert.IsTrue(ThingRegistryClient.IsIoTDiscoSearchURI(Uri)); IEnumerable <SearchOperator> Operators = ThingRegistryClient.DecodeIoTDiscoURI(Uri); this.Test_SearchUri_2(Operators); }
private void ClaimUri_TextChanged(object sender, TextChangedEventArgs e) { try { this.tags = ThingRegistryClient.DecodeIoTDiscoURI(this.ClaimUri.Text); this.TagsListView.Items.Clear(); foreach (MetaDataTag Tag in this.tags) { this.TagsListView.Items.Add(Tag); } this.ClaimButton.IsEnabled = true; } catch (Exception) { this.ClaimButton.IsEnabled = false; } }