コード例 #1
0
ファイル: TestHSSFAnchor.cs プロジェクト: hijson/npoi
        public void TestEqualsIsReflexiveIsSymmetric()
        {
            HSSFClientAnchor clientAnchor1 = new HSSFClientAnchor(0, 1, 2, 3, (short)4, 5, (short)6, 7);
            HSSFClientAnchor clientAnchor2 = new HSSFClientAnchor(0, 1, 2, 3, (short)4, 5, (short)6, 7);

            Assert.IsTrue(clientAnchor1.Equals(clientAnchor2));
            Assert.IsTrue(clientAnchor1.Equals(clientAnchor2));

            HSSFChildAnchor childAnchor1 = new HSSFChildAnchor(0, 1, 2, 3);
            HSSFChildAnchor childAnchor2 = new HSSFChildAnchor(0, 1, 2, 3);

            Assert.IsTrue(childAnchor1.Equals(childAnchor2));
            Assert.IsTrue(childAnchor2.Equals(childAnchor1));
        }
コード例 #2
0
ファイル: TestHSSFAnchor.cs プロジェクト: hijson/npoi
        public void TestNullReferenceIsFalse()
        {
            HSSFClientAnchor clientAnchor = new HSSFClientAnchor(0, 1, 2, 3, (short)4, 5, (short)6, 7);
            Assert.IsFalse(clientAnchor.Equals(null), "Passing null to equals should return false");

            HSSFChildAnchor childAnchor = new HSSFChildAnchor(0, 1, 2, 3);
            Assert.IsFalse(childAnchor.Equals(null), "Passing null to equals should return false");
        }