public void NUIWidgetApplicationOnRegionFormatChanged() { tlog.Debug(tag, $"NUIWidgetApplicationOnRegionFormatChanged START"); var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget)); Assert.IsNotNull(testingTarget, "should be not null."); Assert.IsInstanceOf <NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type."); try { testingTarget.MyOnRegionFormatChanged(new Applications.RegionFormatChangedEventArgs("China")); } catch (Exception e) { tlog.Error(tag, "Caught Exception" + e.ToString()); LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } testingTarget.Dispose(); tlog.Debug(tag, $"NUIWidgetApplicationOnRegionFormatChanged END (OK)"); }
public void NUIWidgetApplicationOnLowBattery() { tlog.Debug(tag, $"NUIWidgetApplicationOnLowBattery START"); var testingTarget = new MyNUIWidgetApplication(typeof(MyWidget)); Assert.IsNotNull(testingTarget, "should be not null."); Assert.IsInstanceOf <NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type."); try { testingTarget.MyOnLowBattery(new Applications.LowBatteryEventArgs(Applications.LowBatteryStatus.PowerOff)); } catch (Exception e) { tlog.Error(tag, "Caught Exception" + e.ToString()); LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } testingTarget.Dispose(); tlog.Debug(tag, $"NUIWidgetApplicationOnLowBattery END (OK)"); }