2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 using ElmSharp.Wearable;
19 namespace ElmSharp.Test.TC
21 class CircleGenListTest3 : TestCaseBase
23 public override string TestName => "CircleGenListTest3";
24 public override string TestDescription => "To display a genlist applied a circle UI on a naviframe";
26 public override void Run(Window window)
28 Conformant conformant = new Conformant(window);
31 var naviframe = new Naviframe(conformant);
33 conformant.SetContent(naviframe);
35 var surface = new CircleSurface(conformant);
37 var list = new CircleGenList(naviframe, surface)
40 VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto,
43 ((IRotaryActionWidget)list).Activate();
44 var item = naviframe.Push(list);
47 GenItemClass defaultClass = new GenItemClass("default")
49 GetTextHandler = (obj, part) =>
51 return string.Format("{0} - {1}",(string)obj, part);
55 for (int i = 0; i < 100; i++)
57 list.Append(defaultClass, string.Format("{0} Item", i));
59 list.ItemSelected += List_ItemSelected; ;
62 private void List_ItemSelected(object sender, GenListItemEventArgs e)
64 Log.Debug(TestName, "{0} Item was selected", (string)(e.Item.Data));