Example #1
0
        private async Task DebugAsync(ITestClass services)
        {
            var result = await services.ResultIntAsync();

            if (result != 100)
            {
                throw new Exception($"Assert not Equals");
            }

            await services.ReturnAsync();

            var hello = services.Hello();

            if (!hello.Equals("Hello"))
            {
                throw new Exception($"Assert not Equals");
            }

            var valueAsync = await services.ValueIntAsync();

            Assert.Equal <int>(1000, valueAsync);

            var stringBuild = await services.StringBuilderAsync();

            var value = stringBuild.ToString();

            Assert.Equal <string>("hello", value);

            var test = services.Test;

            await DebugTestAsync(test);
        }
Example #2
0
        static async void Test(ITestClass testClass)
        {
            var result = await testClass.ResultIntAsync();

            if (result != 100)
            {
                throw new Exception($"Assert not Equals");
            }

            await testClass.ReturnAsync();

            var hello = testClass.Hello();

            if (!hello.Equals("Hello"))
            {
                throw new Exception($"Assert not Equals");
            }
        }