예제 #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());
        }