コード例 #1
0
        public void TaskExtensions_DatabasePath_Error_Should_Fail()
        {
            // Arrange

            // Initilize Xamarin Forms
            MockForms.Init();

            var myException = new NotImplementedException();

            //Action<Exception> myact = (ex => { throw ex; });
#pragma warning disable CS0219 // Variable is assigned but its value is never used
            Action <Exception> myact = (ex => { int a = 1; });
#pragma warning restore CS0219 // Variable is assigned but its value is never used

            // Call with Error=true
            IDataStore <ItemModel> DataSource_SQL = new TestDatabaseService <ItemModel>(true, myact);

            // Act
            // Add each model here to warm up and load it.
            Game.Helpers.DataSetsHelper.WarmUp();

            // Reset

            // Assert
            Assert.AreEqual(true, true);
        }
コード例 #2
0
        public void TaskExtensions_DatabasePath_Default_Should_Pass()
        {
            // Arrange

            // Initilize Xamarin Forms
            MockForms.Init();

            IDataStore <ItemModel> DataSource_SQL = new TestDatabaseService <ItemModel>(false);

            // Act
            // Add each model here to warm up and load it.
            Game.Helpers.DataSetsHelper.WarmUp();

            // Reset

            // Assert
            Assert.AreEqual(true, true);
        }
コード例 #3
0
        public void TestDatabaseService_DeleteAsync_Should_Throw_Excpetion()
        {
            IDataStore <ItemModel> DataSource_SQL = new TestDatabaseService <ItemModel>(false);

            Assert.ThrowsAsync <NotImplementedException>(async() => await DataSource_SQL.DeleteAsync(null));
        }
コード例 #4
0
        public void TestDatabaseService_WipeDataListAsync_Should_Throw_Excpetion()
        {
            IDataStore <ItemModel> DataSource_SQL = new TestDatabaseService <ItemModel>(false);

            Assert.ThrowsAsync <NotImplementedException>(() => DataSource_SQL.WipeDataListAsync());
        }
コード例 #5
0
        public void TestDatabaseService_GetNeedsInitializationAsync_Should_Throw_Excpetion()
        {
            IDataStore <ItemModel> DataSource_SQL = new TestDatabaseService <ItemModel>(false);

            Assert.ThrowsAsync <NotImplementedException>(async() => await DataSource_SQL.GetNeedsInitializationAsync());
        }