コード例 #1
0
        public void TestCallResultSuccessAs()
        {
            var result   = new CallResult <TestObjectResult>(new TestObjectResult());
            var asResult = result.As <TestObject2>(result.Data.InnerData);

            Assert.IsNull(asResult.Error);
            Assert.IsNotNull(asResult.Data);
            Assert.IsTrue(asResult.Data is TestObject2);
            Assert.IsTrue(asResult);
            Assert.IsTrue(asResult.Success);
        }