Test.CBORObjectTest.TestHasTag C# (CSharp) Méthode

TestHasTag() private méthode

private TestHasTag ( ) : void
Résultat void
        public void TestHasTag()
        {
            try {
            CBORObject.True.HasTag(-1);
            Assert.Fail("Should have failed");
              } catch (ArgumentException) {
            new Object();
              } catch (Exception ex) {
            Assert.Fail(ex.ToString());
            throw new InvalidOperationException(String.Empty, ex);
              }
              try {
            const EInteger ValueBigintNull = null;
            CBORObject.True.HasTag(ValueBigintNull);
            Assert.Fail("Should have failed");
              } catch (ArgumentNullException) {
            new Object();
              } catch (Exception ex) {
            Assert.Fail(ex.ToString());
            throw new InvalidOperationException(String.Empty, ex);
              }
              try {
            CBORObject.True.HasTag(EInteger.FromString("-1"));
            Assert.Fail("Should have failed");
              } catch (ArgumentException) {
            new Object();
              } catch (Exception ex) {
            Assert.Fail(ex.ToString());
            throw new InvalidOperationException(String.Empty, ex);
              }
              Assert.IsFalse(CBORObject.True.HasTag(0));
              Assert.IsFalse(CBORObject.True.HasTag(EInteger.Zero));
        }
CBORObjectTest