Beispiel #1
0
        public void Inventory_SetDataSourceSet_Data_Local_Should_Pass()
        {
            // Arrange
            var myBackend    = InventoryBackend.Instance;
            var dataOriginal = myBackend.Index().FirstOrDefault();

            // Act
            InventoryBackend.SetDataSourceDataSet(DataSourceDataSetEnum.Default);

            // Reset
            BiliWeb.Backend.DataSourceBackend.Instance.Reset();

            // Assert
            Assert.IsTrue(true);
        }
Beispiel #2
0
        public void Inventory_SetDataSource_Data_Local_Should_Pass()
        {
            // Arrange
            var myBackend    = InventoryBackend.Instance;
            var dataOriginal = myBackend.Index().FirstOrDefault();

            // Act
            InventoryBackend.SetDataSource(DataSourceEnum.Local);
            var result = InventoryBackend.Instance.GetDataSourceString();

            // Reset
            BiliWeb.Backend.DataSourceBackend.Instance.Reset();

            // Return Data Source to Mock
            InventoryBackend.SetDataSource(DataSourceEnum.Mock);

            // Assert
            Assert.AreEqual("Store", result);
        }