Exemplo n.º 1
0
        public void Backend_IdentityBackend_GetStudentById_Invalid_Student_ID_Should_Fail()
        {
            //arrange
            var backend = new IdentityDataSourceMock();
            var fakeID  = "bogus";

            //act
            var result = backend.GetStudentById(fakeID);

            //assert
            Assert.IsNull(result, TestContext.TestName);
        }
Exemplo n.º 2
0
        public void Backend_IdentityBackend_GetStudentById_Valid_Student_Should_Pass()
        {
            //arrange
            var backend       = new IdentityDataSourceMock();
            var expectStudent = DataSourceBackend.Instance.StudentBackend.GetDefault();

            //var dataSourceBack = DataSourceBackend.Instance;
            //dataSourceBack.SetTestingMode(true);
            //var expectStudent = dataSourceBack.StudentBackend.GetDefault();

            //var expectStudent = DataSourceBackend.Instance.StudentBackend.GetDefault();

            //act
            var result = backend.GetStudentById(expectStudent.Id);

            //assert
            Assert.AreEqual(expectStudent, result, TestContext.TestName);
        }