コード例 #1
0
        public void GetSchoolsTest()
        {
            var schools = FakeJw.GetSchoolsAsync().GetAwaiter().GetResult();

            if (schools.Count != 2)
            {
                Assert.Fail();
            }
        }
コード例 #2
0
        public void LoginTest()
        {
            if (FakeJw.PasswordRequired == false)
            {
                Assert.Fail();
            }
            var jw = FakeJw.LoginAsync(null, null, null).GetAwaiter().GetResult();

            if (jw == null)
            {
                Assert.Fail();
            }
        }
コード例 #3
0
        public void GetStudentInfoAsyncTest()
        {
            var schools     = FakeJw.GetSchoolsAsync().GetAwaiter().GetResult();
            var school      = schools[0];
            var jw          = FakeJw.LoginAsync(school, null, null).GetAwaiter().GetResult();
            var studentInfo = jw.GetStudentInfoAsync().GetAwaiter().GetResult();

            if (studentInfo == null)
            {
                Assert.Fail();
            }
            if (studentInfo.Name != "StudentName")
            {
                Assert.Fail();
            }
        }