private const string _providerId = "org.tizen.ComplicationProviderCsharp/battery";
private const string _notExistProviderId = "org.tizen.notexist";
public static bool _userDisposeCalled;
- private static MyComplication _mc;
class MyComplication : Complication
{
public void Destroy()
{
LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");
- _mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void GetCurrentProviderId_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- _mc.SendUpdateRequest();
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
- string providerId = _mc.GetCurrentProviderId();
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ mc.SendUpdateRequest();
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
+ string providerId = mc.GetCurrentProviderId();
Assert.AreEqual(providerId, _providerId);
- _mc.Dispose();
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void GetCurrentType_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
- ComplicationTypes type = _mc.GetCurrentType();
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
+ ComplicationTypes type = mc.GetCurrentType();
Assert.AreEqual(type, ComplicationTypes.ShortText);
- _mc.Dispose();
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetExtraData_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(15000);
- Assert.AreNotEqual(_mc._extraData, null);
- _mc.Dispose();
+ Assert.AreNotEqual(mc._extraData, null);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetIconPath_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.Icon, EventTypes.EventTap, _providerId, ComplicationTypes.Icon);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.Icon, EventTypes.EventTap, _providerId, ComplicationTypes.Icon);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(_mc._iconPath, null);
- _mc.Dispose();
+ Assert.AreNotEqual(mc._iconPath, null);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetImagePath_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.Image, EventTypes.EventTap, _providerId, ComplicationTypes.Image);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.Image, EventTypes.EventTap, _providerId, ComplicationTypes.Image);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(_mc._imagePath, null);
- _mc.Dispose();
+ Assert.AreNotEqual(mc._imagePath, null);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetLongText_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.LongText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.LongText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(_mc._longtext, null);
- _mc.Dispose();
+ Assert.AreNotEqual(mc._longtext, null);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetCurrentValueOfRange_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.RangedValue, EventTypes.EventTap, _providerId, ComplicationTypes.RangedValue);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.RangedValue, EventTypes.EventTap, _providerId, ComplicationTypes.RangedValue);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreEqual(_expectCurRange, _mc._curRange);
- _mc.Dispose();
+ Assert.AreEqual(_expectCurRange, mc._curRange);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetMaxValueOfRange_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.RangedValue, EventTypes.EventTap, _providerId, ComplicationTypes.RangedValue);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.RangedValue, EventTypes.EventTap, _providerId, ComplicationTypes.RangedValue);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreEqual(_expectMaxRange, _mc._maxRange);
- _mc.Dispose();
+ Assert.AreEqual(_expectMaxRange, mc._maxRange);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetMinValueOfRange_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.RangedValue, EventTypes.EventTap, _providerId, ComplicationTypes.RangedValue);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.RangedValue, EventTypes.EventTap, _providerId, ComplicationTypes.RangedValue);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreEqual(_expectMinRange, _mc._minRange);
- _mc.Dispose();
+ Assert.AreEqual(_expectMinRange, mc._minRange);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetScreenReaderText_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.LongText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.LongText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(null, _mc._screenReaderText);
- _mc.Dispose();
+ Assert.AreNotEqual(null, mc._screenReaderText);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetShortText_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(null, _mc._shorttext);
- _mc.Dispose();
+ Assert.AreNotEqual(null, mc._shorttext);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetTimestamp_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.Time, EventTypes.EventTap, _providerId, ComplicationTypes.Time);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.Time, EventTypes.EventTap, _providerId, ComplicationTypes.Time);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreEqual(_expectTimestamp, _mc._timestamp);
- _mc.Dispose();
+ Assert.AreEqual(_expectTimestamp, mc._timestamp);
+ mc.Dispose();
}
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetTitle_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(null, _mc._title);
- _mc.Dispose();
+ Assert.AreNotEqual(null, mc._title);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task GetType_Return_Value()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreEqual(ComplicationTypes.ShortText, _mc._curDataType);
- _mc.Dispose();
+ Assert.AreEqual(ComplicationTypes.ShortText, mc._curDataType);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task OnComplicationError_RECEIVE_EVENT()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreEqual(true, _mc._onErrorHit);
- _mc.Dispose();
+ Assert.AreEqual(true, mc._onErrorHit);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task OnComplicationUpdated_RECEIVE_EVENT()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(null, _mc._shorttext);
- _mc.Dispose();
+ Assert.AreNotEqual(null, mc._shorttext);
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public async Task SendUpdateRequest_SEND()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
try
{
- _mc.SendUpdateRequest();
+ mc.SendUpdateRequest();
await Task.Delay(5000);
- Assert.AreNotEqual(null, _mc._shorttext);
+ Assert.AreNotEqual(null, mc._shorttext);
}
catch (Exception e)
{
}
finally
{
- _mc.Dispose();
+ mc.Dispose();
}
}
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void SendUpdateRequest_InvalidOperationException()
{
- _mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, "aaa", ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_notEditedCompId, ComplicationTypes.ShortText | ComplicationTypes.LongText, EventTypes.EventTap, "aaa", ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
- Assert.Throws<InvalidOperationException>(() => _mc.SendUpdateRequest());
- _mc.Dispose();
+ Assert.Throws<InvalidOperationException>(() => mc.SendUpdateRequest());
+ mc.Dispose();
}
[Test]
[Property("COVPARAM", "Tizen.Applications.WatchfaceComplication.EventTypes")]
public void TransferEvent_SEND()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
try
{
Log.Debug("[TCT]", "[TransferEvent] ");
- _mc.TransferEvent(EventTypes.EventTap);
+ mc.TransferEvent(EventTypes.EventTap);
}
catch (Exception e)
{
}
finally
{
- _mc.Dispose();
+ mc.Dispose();
}
}
[Property("COVPARAM", "Tizen.Applications.WatchfaceComplication.EventTypes")]
public void TransferEvent_InvalidOperationException()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, "aaa", ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
- Assert.Throws<InvalidOperationException>(() => _mc.TransferEvent(EventTypes.EventTap));
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, "aaa", ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
+ Assert.Throws<InvalidOperationException>(() => mc.TransferEvent(EventTypes.EventTap));
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void AllowedList_Return_Value()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
try
{
List<(string providerId, ComplicationTypes t)> allowedList = new List<(string providerId, ComplicationTypes t)>();
allowedList.Add((_providerId, ComplicationTypes.ShortText));
- _mc.AllowedList = allowedList;
+ mc.AllowedList = allowedList;
}
catch (Exception e)
{
}
finally
{
- _mc.Dispose();
+ mc.Dispose();
}
}
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void ComplicationId_Return_Value()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
try
{
- Assert.AreEqual(_compId, _mc.ComplicationId);
+ Assert.AreEqual(_compId, mc.ComplicationId);
}
catch (Exception e)
{
}
finally
{
- _mc.Dispose();
+ mc.Dispose();
}
}
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void Highlight_Return_Value()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
try
{
- _mc.Highlight = new Highlight(ShapeType.Rectangle, 1, 2, 3, 4);
- Assert.IsNotNull(_mc.Highlight, "Object should not be null after initializing");
- Assert.AreEqual(ShapeType.Rectangle, _mc.Highlight.ShapeType);
- Assert.AreEqual(1, _mc.Highlight.X);
- Assert.AreEqual(2, _mc.Highlight.Y);
- Assert.AreEqual(3, _mc.Highlight.W);
- Assert.AreEqual(4, _mc.Highlight.H);
+ mc.Highlight = new Highlight(ShapeType.Rectangle, 1, 2, 3, 4);
+ Assert.IsNotNull(mc.Highlight, "Object should not be null after initializing");
+ Assert.AreEqual(ShapeType.Rectangle, mc.Highlight.ShapeType);
+ Assert.AreEqual(1, mc.Highlight.X);
+ Assert.AreEqual(2, mc.Highlight.Y);
+ Assert.AreEqual(3, mc.Highlight.W);
+ Assert.AreEqual(4, mc.Highlight.H);
}
catch (Exception e)
{
}
finally
{
- _mc.Dispose();
+ mc.Dispose();
}
}
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void SupportEvents_Return_Value()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventDoubleTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
- Assert.AreEqual(_mc.SupportEvents, EventTypes.EventDoubleTap);
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText, EventTypes.EventDoubleTap, _providerId, ComplicationTypes.ShortText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
+ Assert.AreEqual(mc.SupportEvents, EventTypes.EventDoubleTap);
- _mc.Dispose();
+ mc.Dispose();
}
[Test]
[Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")]
public void SupportTypes_Return_Value()
{
- _mc = new MyComplication(_compId, ComplicationTypes.ShortText | ComplicationTypes.Image | ComplicationTypes.LongText,
+ var mc = new MyComplication(_compId, ComplicationTypes.ShortText | ComplicationTypes.Image | ComplicationTypes.LongText,
EventTypes.EventDoubleTap, _providerId, ComplicationTypes.ShortText);
- Assert.IsNotNull(_mc, "Object should not be null after initializing");
- Assert.IsInstanceOf<Complication>(_mc, "Object should be instance of Complication");
- Assert.AreEqual(_mc.SupportTypes, ComplicationTypes.ShortText | ComplicationTypes.Image | ComplicationTypes.LongText);
+ Assert.IsNotNull(mc, "Object should not be null after initializing");
+ Assert.IsInstanceOf<Complication>(mc, "Object should be instance of Complication");
+ Assert.AreEqual(mc.SupportTypes, ComplicationTypes.ShortText | ComplicationTypes.Image | ComplicationTypes.LongText);
- _mc.Dispose();
+ mc.Dispose();
}
}
}
\ No newline at end of file