async Task ExecuteLoadItemsCommand() { try { Stores.Clear(); var palletMaster = await DataStore.GetPalletMaterDataAsync(); foreach (var item in palletMaster.Stores) { Stores.Add(item); } Status.Clear(); foreach (var item in palletMaster.Status) { Status.Add(item); } Categories.Clear(); foreach (var item in palletMaster.Categories) { Categories.Add(item); } Wrappers.Clear(); foreach (var item in palletMaster.Wrappers) { Wrappers.Add(item); } Shippers.Clear(); foreach (var item in palletMaster.Shippers) { Shippers.Add(item); } Suppliers.Clear(); foreach (var item in palletMaster.Suppliers) { Suppliers.Add(item); } Builders.Clear(); foreach (var item in palletMaster.Builders) { Builders.Add(item); } PalletTypes.Clear(); foreach (var item in palletMaster.PalletTypes) { PalletTypes.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } }
public async Task TryWriteRawValue_ForUnknownCharacteristics_LogsError( ) { Wrappers.Clear( ); var sut = CreateSut( ); ServiceWrapper.Uuid .Returns(sut.GattServiceUuid); await sut.Initialize <TestCharacteristicBase> ( ) .Refresh( ); await sut.TryWriteRawValue(RawValue1); Logger.ReceivedWithAnyArgs( ) .Error(Arg.Any <string> ( )); }
public async Task TryWriteRawValue_ForUnknownCharacteristics_ReturnsFalse( ) { Wrappers.Clear( ); var sut = CreateSut( ); ServiceWrapper.Uuid .Returns(sut.GattServiceUuid); await sut.Initialize <TestCharacteristicBase> ( ) .Refresh( ); sut.TryWriteRawValue(RawValue1) .Result .Should( ) .Be(false); }