[Test] // ctor (Byte []) public void Constructor2 () { byte [] bytes; SoapHexBinary shb; bytes = new byte [] { 2, 3, 5, 7, 11 }; shb = new SoapHexBinary (bytes); Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#A1"); Assert.AreEqual ("020305070B", shb.ToString (), "#A2"); Assert.AreSame (bytes, shb.Value, "#A3"); bytes = new byte [0]; shb = new SoapHexBinary (bytes); Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#B1"); Assert.AreEqual ("", shb.ToString (), "#B2"); Assert.AreSame (bytes, shb.Value, "#B3"); bytes = null; shb = new SoapHexBinary (bytes); Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#C1"); try { shb.ToString (); Assert.Fail ("#C2"); } catch (NullReferenceException) { } Assert.IsNull (shb.Value, "#C3"); }
[Test] // ctor () public void Constructor1 () { SoapHexBinary shb = new SoapHexBinary (); Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#1"); try { shb.ToString (); Assert.Fail ("#2"); } catch (NullReferenceException) { } Assert.IsNull (shb.Value, "#3"); }