コード例 #1
0
        public void SingleValuedExample()
        {
            ClientRef clientRef1 = ClientRef.From("ASDF12345");
            ClientRef clientRef2 = ClientRef.From("ASDF12345");

            Assert.AreEqual(clientRef1, clientRef2);
            Assert.AreEqual(clientRef1.GetHashCode(), clientRef2.GetHashCode());

            ClientRef clientRef3 = ClientRef.From("QWER98765");

            Assert.AreNotEqual(clientRef1, clientRef3);
            Assert.AreNotEqual(clientRef1.GetHashCode(), clientRef3.GetHashCode());
        }
コード例 #2
0
ファイル: ToString.cs プロジェクト: warren-spawtz/ValueOf
        public void ToStringReturnsValueToStringForSingleValuedObjects()
        {
            ClientRef clientRef1 = ClientRef.From("ASDF12345");

            Assert.AreEqual(clientRef1.Value, clientRef1.ToString());
        }