예제 #1
0
파일: TSExtents.cs 프로젝트: wonrst/TizenFX
        public void ExtentsCopyFrom()
        {
            tlog.Debug(tag, $"ExtentsCopyFrom START");

            var testingTarget = new Extents();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Extents>(testingTarget, "should be an instance of testing target class!");

            Assert.AreEqual(0, testingTarget.Top, "Should be equal!");

            using (Extents extents = new Extents(20, 20, 20, 20))
            {
                testingTarget.CopyFrom(extents);
                Assert.AreEqual(20, testingTarget.Top, "Should be equal!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"ExtentsCopyFrom END (OK)");
        }
예제 #2
0
파일: TSExtents.cs 프로젝트: wonrst/TizenFX
        public void ExtentsCopyFromNullExtents()
        {
            tlog.Debug(tag, $"ExtentsCopyFromNullExtents START");

            var testingTarget = new Extents();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Extents>(testingTarget, "should be an instance of testing target class!");

            Assert.AreEqual(0, testingTarget.Top, "Should be equal!");

            try
            {
                Extents extents = null;
                testingTarget.CopyFrom(extents);
            }
            catch (ArgumentNullException)
            {
                testingTarget.Dispose();
                tlog.Debug(tag, $"ExtentsCopyFromNullExtents END (OK)");
                Assert.Pass("Caught ArgumentNullException : Passed!");
            }
        }