public void NUIWidgetApplicationAddWidgetTypeWithDictionary() { tlog.Debug(tag, $"NUIWidgetApplicationAddWidgetTypeWithDictionary START"); var testingTarget = new NUIWidgetApplication(typeof(MyWidget)); Assert.IsNotNull(testingTarget, "should be not null."); Assert.IsInstanceOf <NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type."); try { Dictionary <global::System.Type, string> widgetTypes = new Dictionary <Type, string>(); widgetTypes.Add(typeof(MyWidget), "MyWidget"); testingTarget.AddWidgetType(widgetTypes); } 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, $"NUIWidgetApplicationAddWidgetTypeWithDictionary END (OK)"); }
public void NUIWidgetApplicationAddWidgetType() { tlog.Debug(tag, $"NUIWidgetApplicationAddWidgetType START"); var testingTarget = new NUIWidgetApplication(typeof(MyWidget)); Assert.IsNotNull(testingTarget, "should be not null."); Assert.IsInstanceOf <NUIWidgetApplication>(testingTarget, "Should be an instance of NUIWidgetApplication type."); try { testingTarget.AddWidgetType(typeof(MyWidget)); } 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, $"NUIWidgetApplicationAddWidgetType END (OK)"); }