コード例 #1
0
        public static bool TryParse(string value, out ShortGuid sguid)
        {
            if (string.IsNullOrEmpty(value))
            {
                sguid = null;
                return(false);
            }

            try
            {
                sguid = new ShortGuid(value);
                return(true);
            }
            catch
            {
                sguid = ShortGuid.Empty;
                return(false);
            }
        }
コード例 #2
0
 public void EqualsTest()
 {
     ShortGuid target = new ShortGuid(); // TODO: Initialize to an appropriate value
     object obj = null; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.Equals(obj);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #3
0
 public void TryParseTest()
 {
     string value = string.Empty; // TODO: Initialize to an appropriate value
     ShortGuid sguid = new ShortGuid(); // TODO: Initialize to an appropriate value
     ShortGuid sguidExpected = new ShortGuid(); // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = ShortGuid.TryParse(value, out sguid);
     Assert.AreEqual(sguidExpected, sguid);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #4
0
 public void ValueTest()
 {
     ShortGuid target = new ShortGuid(); // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     target.Value = expected;
     actual = target.Value;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #5
0
 public void ShortGuidConstructorTest()
 {
     Guid guid = new Guid(); // TODO: Initialize to an appropriate value
     ShortGuid target = new ShortGuid(guid);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
コード例 #6
0
 public void ShortGuidConstructorTest1()
 {
     string value = string.Empty; // TODO: Initialize to an appropriate value
     ShortGuid target = new ShortGuid(value);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
コード例 #7
0
 public void op_ImplicitTest3()
 {
     ShortGuid shortGuid = new ShortGuid(); // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = shortGuid;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #8
0
 public void op_InequalityTest()
 {
     ShortGuid x = new ShortGuid(); // TODO: Initialize to an appropriate value
     ShortGuid y = new ShortGuid(); // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = (x != y);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #9
0
 public void op_ImplicitTest1()
 {
     Guid guid = new Guid(); // TODO: Initialize to an appropriate value
     ShortGuid expected = new ShortGuid(); // TODO: Initialize to an appropriate value
     ShortGuid actual;
     actual = guid;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #10
0
 public void HasValueTest()
 {
     ShortGuid target = new ShortGuid(); // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.HasValue;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #11
0
 public void GuidTest()
 {
     ShortGuid target = new ShortGuid(); // TODO: Initialize to an appropriate value
     Guid expected = new Guid(); // TODO: Initialize to an appropriate value
     Guid actual;
     target.Guid = expected;
     actual = target.Guid;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #12
0
 public void GetHashCodeTest()
 {
     ShortGuid target = new ShortGuid(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.GetHashCode();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #13
0
ファイル: ShortGuid.cs プロジェクト: keith9820/Groundfloor
        public static bool TryParse(string value, out ShortGuid sguid)
        {
            if (string.IsNullOrEmpty(value))
            {
                sguid = null;
                return false;
            }

            try
            {
                sguid = new ShortGuid(value);
                return true;
            }
            catch
            {
                sguid = ShortGuid.Empty;
                return false;
            }
        }