diff --git a/LastenradBayern/TINK.Android/LastenradBayern.Android.csproj b/LastenradBayern/TINK.Android/LastenradBayern.Android.csproj index 2d558b7..14c7457 100644 --- a/LastenradBayern/TINK.Android/LastenradBayern.Android.csproj +++ b/LastenradBayern/TINK.Android/LastenradBayern.Android.csproj @@ -77,7 +77,7 @@ - + 1.6.3 @@ -86,7 +86,7 @@ 1.6.3 - + @@ -185,7 +185,7 @@ 1.0.0.16 - 1.2.1.9 + 1.3.0 @@ -195,9 +195,9 @@ 1.7.5 - + - 5.0.0.2545 + 5.0.0.2578 5.0.0 diff --git a/LastenradBayern/TINK.Android/Properties/AndroidManifest.xml b/LastenradBayern/TINK.Android/Properties/AndroidManifest.xml index c2deab7..6aecb5c 100644 --- a/LastenradBayern/TINK.Android/Properties/AndroidManifest.xml +++ b/LastenradBayern/TINK.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/LastenradBayern/TINK.Android/Resources/Resource.Designer.cs b/LastenradBayern/TINK.Android/Resources/Resource.Designer.cs index daf0276..afa3e7c 100644 --- a/LastenradBayern/TINK.Android/Resources/Resource.Designer.cs +++ b/LastenradBayern/TINK.Android/Resources/Resource.Designer.cs @@ -24909,670 +24909,676 @@ namespace TINK.Droid public const int inward = 2131230967; // aapt resource value: 0x7F0800F8 - public const int italic = 2131230968; + public const int is_pooling_container_tag = 2131230968; // aapt resource value: 0x7F0800F9 - public const int item_touch_helper_previous_elevation = 2131230969; + public const int italic = 2131230969; // aapt resource value: 0x7F0800FA - public const int jumpToEnd = 2131230970; + public const int item_touch_helper_previous_elevation = 2131230970; // aapt resource value: 0x7F0800FB - public const int jumpToStart = 2131230971; + public const int jumpToEnd = 2131230971; // aapt resource value: 0x7F0800FC - public const int labeled = 2131230972; + public const int jumpToStart = 2131230972; // aapt resource value: 0x7F0800FD - public const int large_icon_uri = 2131230973; + public const int labeled = 2131230973; // aapt resource value: 0x7F0800FE - public const int layout = 2131230974; + public const int large_icon_uri = 2131230974; // aapt resource value: 0x7F0800FF - public const int left = 2131230975; + public const int layout = 2131230975; // aapt resource value: 0x7F080100 - public const int leftToRight = 2131230976; + public const int left = 2131230976; // aapt resource value: 0x7F080101 - public const int legacy = 2131230977; + public const int leftToRight = 2131230977; // aapt resource value: 0x7F080102 - public const int light = 2131230978; + public const int legacy = 2131230978; // aapt resource value: 0x7F080103 - public const int line1 = 2131230979; + public const int light = 2131230979; // aapt resource value: 0x7F080104 - public const int line3 = 2131230980; + public const int line1 = 2131230980; // aapt resource value: 0x7F080105 - public const int linear = 2131230981; + public const int line3 = 2131230981; // aapt resource value: 0x7F080106 - public const int listMode = 2131230982; + public const int linear = 2131230982; // aapt resource value: 0x7F080107 - public const int list_item = 2131230983; + public const int listMode = 2131230983; // aapt resource value: 0x7F080108 - public const int main_appbar = 2131230984; + public const int list_item = 2131230984; // aapt resource value: 0x7F080109 - public const int main_tablayout = 2131230985; + public const int main_appbar = 2131230985; // aapt resource value: 0x7F08010A - public const int main_toolbar = 2131230986; + public const int main_tablayout = 2131230986; // aapt resource value: 0x7F08010B - public const int main_viewpager = 2131230987; + public const int main_toolbar = 2131230987; // aapt resource value: 0x7F08010C - public const int masked = 2131230988; + public const int main_viewpager = 2131230988; // aapt resource value: 0x7F08010D - public const int match_constraint = 2131230989; + public const int masked = 2131230989; // aapt resource value: 0x7F08010E - public const int match_global_nicknames = 2131230990; + public const int match_constraint = 2131230990; // aapt resource value: 0x7F08010F - public const int match_parent = 2131230991; + public const int match_global_nicknames = 2131230991; // aapt resource value: 0x7F080110 - public const int material_clock_display = 2131230992; + public const int match_parent = 2131230992; // aapt resource value: 0x7F080111 - public const int material_clock_face = 2131230993; + public const int material_clock_display = 2131230993; // aapt resource value: 0x7F080112 - public const int material_clock_hand = 2131230994; + public const int material_clock_face = 2131230994; // aapt resource value: 0x7F080113 - public const int material_clock_period_am_button = 2131230995; + public const int material_clock_hand = 2131230995; // aapt resource value: 0x7F080114 - public const int material_clock_period_pm_button = 2131230996; + public const int material_clock_period_am_button = 2131230996; // aapt resource value: 0x7F080115 - public const int material_clock_period_toggle = 2131230997; + public const int material_clock_period_pm_button = 2131230997; // aapt resource value: 0x7F080116 - public const int material_hour_text_input = 2131230998; + public const int material_clock_period_toggle = 2131230998; // aapt resource value: 0x7F080117 - public const int material_hour_tv = 2131230999; + public const int material_hour_text_input = 2131230999; // aapt resource value: 0x7F080118 - public const int material_label = 2131231000; + public const int material_hour_tv = 2131231000; // aapt resource value: 0x7F080119 - public const int material_minute_text_input = 2131231001; + public const int material_label = 2131231001; // aapt resource value: 0x7F08011A - public const int material_minute_tv = 2131231002; + public const int material_minute_text_input = 2131231002; // aapt resource value: 0x7F08011B - public const int material_textinput_timepicker = 2131231003; + public const int material_minute_tv = 2131231003; // aapt resource value: 0x7F08011C - public const int material_timepicker_cancel_button = 2131231004; + public const int material_textinput_timepicker = 2131231004; // aapt resource value: 0x7F08011D - public const int material_timepicker_container = 2131231005; + public const int material_timepicker_cancel_button = 2131231005; // aapt resource value: 0x7F08011E - public const int material_timepicker_edit_text = 2131231006; + public const int material_timepicker_container = 2131231006; // aapt resource value: 0x7F08011F - public const int material_timepicker_mode_button = 2131231007; + public const int material_timepicker_edit_text = 2131231007; // aapt resource value: 0x7F080120 - public const int material_timepicker_ok_button = 2131231008; + public const int material_timepicker_mode_button = 2131231008; // aapt resource value: 0x7F080121 - public const int material_timepicker_view = 2131231009; + public const int material_timepicker_ok_button = 2131231009; // aapt resource value: 0x7F080122 - public const int material_value_index = 2131231010; + public const int material_timepicker_view = 2131231010; // aapt resource value: 0x7F080123 - public const int media_actions = 2131231011; + public const int material_value_index = 2131231011; // aapt resource value: 0x7F080124 - public const int media_controller_compat_view_tag = 2131231012; + public const int media_actions = 2131231012; // aapt resource value: 0x7F080125 - public const int message = 2131231013; + public const int media_controller_compat_view_tag = 2131231013; + + // aapt resource value: 0x7F080126 + public const int message = 2131231014; // aapt resource value: 0x7F080005 public const int META = 2131230725; - // aapt resource value: 0x7F080126 - public const int middle = 2131231014; - // aapt resource value: 0x7F080127 - public const int mini = 2131231015; + public const int middle = 2131231015; // aapt resource value: 0x7F080128 - public const int month_grid = 2131231016; + public const int mini = 2131231016; // aapt resource value: 0x7F080129 - public const int month_navigation_bar = 2131231017; + public const int month_grid = 2131231017; // aapt resource value: 0x7F08012A - public const int month_navigation_fragment_toggle = 2131231018; + public const int month_navigation_bar = 2131231018; // aapt resource value: 0x7F08012B - public const int month_navigation_next = 2131231019; + public const int month_navigation_fragment_toggle = 2131231019; // aapt resource value: 0x7F08012C - public const int month_navigation_previous = 2131231020; + public const int month_navigation_next = 2131231020; // aapt resource value: 0x7F08012D - public const int month_title = 2131231021; + public const int month_navigation_previous = 2131231021; // aapt resource value: 0x7F08012E - public const int motion_base = 2131231022; + public const int month_title = 2131231022; // aapt resource value: 0x7F08012F - public const int mr_art = 2131231023; + public const int motion_base = 2131231023; // aapt resource value: 0x7F080130 - public const int mr_cast_checkbox = 2131231024; + public const int mr_art = 2131231024; // aapt resource value: 0x7F080131 - public const int mr_cast_close_button = 2131231025; + public const int mr_cast_checkbox = 2131231025; // aapt resource value: 0x7F080132 - public const int mr_cast_divider = 2131231026; + public const int mr_cast_close_button = 2131231026; // aapt resource value: 0x7F080133 - public const int mr_cast_group_icon = 2131231027; + public const int mr_cast_divider = 2131231027; // aapt resource value: 0x7F080134 - public const int mr_cast_group_name = 2131231028; + public const int mr_cast_group_icon = 2131231028; // aapt resource value: 0x7F080135 - public const int mr_cast_group_progress_bar = 2131231029; + public const int mr_cast_group_name = 2131231029; // aapt resource value: 0x7F080136 - public const int mr_cast_header_name = 2131231030; + public const int mr_cast_group_progress_bar = 2131231030; // aapt resource value: 0x7F080137 - public const int mr_cast_list = 2131231031; + public const int mr_cast_header_name = 2131231031; // aapt resource value: 0x7F080138 - public const int mr_cast_meta_art = 2131231032; + public const int mr_cast_list = 2131231032; // aapt resource value: 0x7F080139 - public const int mr_cast_meta_background = 2131231033; + public const int mr_cast_meta_art = 2131231033; // aapt resource value: 0x7F08013A - public const int mr_cast_meta_black_scrim = 2131231034; + public const int mr_cast_meta_background = 2131231034; // aapt resource value: 0x7F08013B - public const int mr_cast_meta_subtitle = 2131231035; + public const int mr_cast_meta_black_scrim = 2131231035; // aapt resource value: 0x7F08013C - public const int mr_cast_meta_title = 2131231036; + public const int mr_cast_meta_subtitle = 2131231036; // aapt resource value: 0x7F08013D - public const int mr_cast_mute_button = 2131231037; + public const int mr_cast_meta_title = 2131231037; // aapt resource value: 0x7F08013E - public const int mr_cast_route_icon = 2131231038; + public const int mr_cast_mute_button = 2131231038; // aapt resource value: 0x7F08013F - public const int mr_cast_route_name = 2131231039; + public const int mr_cast_route_icon = 2131231039; // aapt resource value: 0x7F080140 - public const int mr_cast_route_progress_bar = 2131231040; + public const int mr_cast_route_name = 2131231040; // aapt resource value: 0x7F080141 - public const int mr_cast_stop_button = 2131231041; + public const int mr_cast_route_progress_bar = 2131231041; // aapt resource value: 0x7F080142 - public const int mr_cast_volume_layout = 2131231042; + public const int mr_cast_stop_button = 2131231042; // aapt resource value: 0x7F080143 - public const int mr_cast_volume_slider = 2131231043; + public const int mr_cast_volume_layout = 2131231043; // aapt resource value: 0x7F080144 - public const int mr_chooser_list = 2131231044; + public const int mr_cast_volume_slider = 2131231044; // aapt resource value: 0x7F080145 - public const int mr_chooser_route_desc = 2131231045; + public const int mr_chooser_list = 2131231045; // aapt resource value: 0x7F080146 - public const int mr_chooser_route_icon = 2131231046; + public const int mr_chooser_route_desc = 2131231046; // aapt resource value: 0x7F080147 - public const int mr_chooser_route_name = 2131231047; + public const int mr_chooser_route_icon = 2131231047; // aapt resource value: 0x7F080148 - public const int mr_chooser_route_progress_bar = 2131231048; + public const int mr_chooser_route_name = 2131231048; // aapt resource value: 0x7F080149 - public const int mr_chooser_title = 2131231049; + public const int mr_chooser_route_progress_bar = 2131231049; // aapt resource value: 0x7F08014A - public const int mr_close = 2131231050; + public const int mr_chooser_title = 2131231050; // aapt resource value: 0x7F08014B - public const int mr_control_divider = 2131231051; + public const int mr_close = 2131231051; // aapt resource value: 0x7F08014C - public const int mr_control_playback_ctrl = 2131231052; + public const int mr_control_divider = 2131231052; // aapt resource value: 0x7F08014D - public const int mr_control_subtitle = 2131231053; + public const int mr_control_playback_ctrl = 2131231053; // aapt resource value: 0x7F08014E - public const int mr_control_title = 2131231054; + public const int mr_control_subtitle = 2131231054; // aapt resource value: 0x7F08014F - public const int mr_control_title_container = 2131231055; + public const int mr_control_title = 2131231055; // aapt resource value: 0x7F080150 - public const int mr_custom_control = 2131231056; + public const int mr_control_title_container = 2131231056; // aapt resource value: 0x7F080151 - public const int mr_default_control = 2131231057; + public const int mr_custom_control = 2131231057; // aapt resource value: 0x7F080152 - public const int mr_dialog_area = 2131231058; + public const int mr_default_control = 2131231058; // aapt resource value: 0x7F080153 - public const int mr_expandable_area = 2131231059; + public const int mr_dialog_area = 2131231059; // aapt resource value: 0x7F080154 - public const int mr_group_expand_collapse = 2131231060; + public const int mr_expandable_area = 2131231060; // aapt resource value: 0x7F080155 - public const int mr_group_volume_route_name = 2131231061; + public const int mr_group_expand_collapse = 2131231061; // aapt resource value: 0x7F080156 - public const int mr_media_main_control = 2131231062; + public const int mr_group_volume_route_name = 2131231062; // aapt resource value: 0x7F080157 - public const int mr_name = 2131231063; + public const int mr_media_main_control = 2131231063; // aapt resource value: 0x7F080158 - public const int mr_picker_close_button = 2131231064; + public const int mr_name = 2131231064; // aapt resource value: 0x7F080159 - public const int mr_picker_header_name = 2131231065; + public const int mr_picker_close_button = 2131231065; // aapt resource value: 0x7F08015A - public const int mr_picker_list = 2131231066; + public const int mr_picker_header_name = 2131231066; // aapt resource value: 0x7F08015B - public const int mr_picker_route_icon = 2131231067; + public const int mr_picker_list = 2131231067; // aapt resource value: 0x7F08015C - public const int mr_picker_route_name = 2131231068; + public const int mr_picker_route_icon = 2131231068; // aapt resource value: 0x7F08015D - public const int mr_picker_route_progress_bar = 2131231069; + public const int mr_picker_route_name = 2131231069; // aapt resource value: 0x7F08015E - public const int mr_playback_control = 2131231070; + public const int mr_picker_route_progress_bar = 2131231070; // aapt resource value: 0x7F08015F - public const int mr_title_bar = 2131231071; + public const int mr_playback_control = 2131231071; // aapt resource value: 0x7F080160 - public const int mr_volume_control = 2131231072; + public const int mr_title_bar = 2131231072; // aapt resource value: 0x7F080161 - public const int mr_volume_group_list = 2131231073; + public const int mr_volume_control = 2131231073; // aapt resource value: 0x7F080162 - public const int mr_volume_item_icon = 2131231074; + public const int mr_volume_group_list = 2131231074; // aapt resource value: 0x7F080163 - public const int mr_volume_slider = 2131231075; + public const int mr_volume_item_icon = 2131231075; // aapt resource value: 0x7F080164 - public const int mtrl_anchor_parent = 2131231076; - - // aapt resource value: 0x7F080166 - public const int mtrl_calendar_days_of_week = 2131231078; + public const int mr_volume_slider = 2131231076; // aapt resource value: 0x7F080165 - public const int mtrl_calendar_day_selector_frame = 2131231077; + public const int mtrl_anchor_parent = 2131231077; // aapt resource value: 0x7F080167 - public const int mtrl_calendar_frame = 2131231079; + public const int mtrl_calendar_days_of_week = 2131231079; + + // aapt resource value: 0x7F080166 + public const int mtrl_calendar_day_selector_frame = 2131231078; // aapt resource value: 0x7F080168 - public const int mtrl_calendar_main_pane = 2131231080; + public const int mtrl_calendar_frame = 2131231080; // aapt resource value: 0x7F080169 - public const int mtrl_calendar_months = 2131231081; + public const int mtrl_calendar_main_pane = 2131231081; // aapt resource value: 0x7F08016A - public const int mtrl_calendar_selection_frame = 2131231082; + public const int mtrl_calendar_months = 2131231082; // aapt resource value: 0x7F08016B - public const int mtrl_calendar_text_input_frame = 2131231083; + public const int mtrl_calendar_selection_frame = 2131231083; // aapt resource value: 0x7F08016C - public const int mtrl_calendar_year_selector_frame = 2131231084; + public const int mtrl_calendar_text_input_frame = 2131231084; // aapt resource value: 0x7F08016D - public const int mtrl_card_checked_layer_id = 2131231085; + public const int mtrl_calendar_year_selector_frame = 2131231085; // aapt resource value: 0x7F08016E - public const int mtrl_child_content_container = 2131231086; + public const int mtrl_card_checked_layer_id = 2131231086; // aapt resource value: 0x7F08016F - public const int mtrl_internal_children_alpha_tag = 2131231087; + public const int mtrl_child_content_container = 2131231087; // aapt resource value: 0x7F080170 - public const int mtrl_motion_snapshot_view = 2131231088; + public const int mtrl_internal_children_alpha_tag = 2131231088; // aapt resource value: 0x7F080171 - public const int mtrl_picker_fullscreen = 2131231089; + public const int mtrl_motion_snapshot_view = 2131231089; // aapt resource value: 0x7F080172 - public const int mtrl_picker_header = 2131231090; + public const int mtrl_picker_fullscreen = 2131231090; // aapt resource value: 0x7F080173 - public const int mtrl_picker_header_selection_text = 2131231091; + public const int mtrl_picker_header = 2131231091; // aapt resource value: 0x7F080174 - public const int mtrl_picker_header_title_and_selection = 2131231092; + public const int mtrl_picker_header_selection_text = 2131231092; // aapt resource value: 0x7F080175 - public const int mtrl_picker_header_toggle = 2131231093; + public const int mtrl_picker_header_title_and_selection = 2131231093; // aapt resource value: 0x7F080176 - public const int mtrl_picker_text_input_date = 2131231094; + public const int mtrl_picker_header_toggle = 2131231094; // aapt resource value: 0x7F080177 - public const int mtrl_picker_text_input_range_end = 2131231095; + public const int mtrl_picker_text_input_date = 2131231095; // aapt resource value: 0x7F080178 - public const int mtrl_picker_text_input_range_start = 2131231096; + public const int mtrl_picker_text_input_range_end = 2131231096; // aapt resource value: 0x7F080179 - public const int mtrl_picker_title_text = 2131231097; + public const int mtrl_picker_text_input_range_start = 2131231097; // aapt resource value: 0x7F08017A - public const int mtrl_view_tag_bottom_padding = 2131231098; + public const int mtrl_picker_title_text = 2131231098; // aapt resource value: 0x7F08017B - public const int multiply = 2131231099; - - // aapt resource value: 0x7F08017D - public const int navigation_bar_item_icon_view = 2131231101; - - // aapt resource value: 0x7F08017E - public const int navigation_bar_item_labels_group = 2131231102; - - // aapt resource value: 0x7F08017F - public const int navigation_bar_item_large_label_view = 2131231103; - - // aapt resource value: 0x7F080180 - public const int navigation_bar_item_small_label_view = 2131231104; - - // aapt resource value: 0x7F080181 - public const int navigation_header_container = 2131231105; + public const int mtrl_view_tag_bottom_padding = 2131231099; // aapt resource value: 0x7F08017C - public const int nav_controller_view_tag = 2131231100; + public const int multiply = 2131231100; + + // aapt resource value: 0x7F08017E + public const int navigation_bar_item_icon_view = 2131231102; + + // aapt resource value: 0x7F08017F + public const int navigation_bar_item_labels_group = 2131231103; + + // aapt resource value: 0x7F080180 + public const int navigation_bar_item_large_label_view = 2131231104; + + // aapt resource value: 0x7F080181 + public const int navigation_bar_item_small_label_view = 2131231105; // aapt resource value: 0x7F080182 - public const int never = 2131231106; + public const int navigation_header_container = 2131231106; + + // aapt resource value: 0x7F08017D + public const int nav_controller_view_tag = 2131231101; // aapt resource value: 0x7F080183 - public const int neverCompleteToEnd = 2131231107; + public const int never = 2131231107; // aapt resource value: 0x7F080184 - public const int neverCompleteToStart = 2131231108; - - // aapt resource value: 0x7F080187 - public const int none = 2131231111; - - // aapt resource value: 0x7F080188 - public const int normal = 2131231112; - - // aapt resource value: 0x7F080189 - public const int north = 2131231113; + public const int neverCompleteToEnd = 2131231108; // aapt resource value: 0x7F080185 - public const int noScroll = 2131231109; + public const int neverCompleteToStart = 2131231109; - // aapt resource value: 0x7F080186 - public const int noState = 2131231110; + // aapt resource value: 0x7F080188 + public const int none = 2131231112; + + // aapt resource value: 0x7F080189 + public const int normal = 2131231113; // aapt resource value: 0x7F08018A - public const int notification_background = 2131231114; + public const int north = 2131231114; + + // aapt resource value: 0x7F080186 + public const int noScroll = 2131231110; + + // aapt resource value: 0x7F080187 + public const int noState = 2131231111; // aapt resource value: 0x7F08018B - public const int notification_main_column = 2131231115; + public const int notification_background = 2131231115; // aapt resource value: 0x7F08018C - public const int notification_main_column_container = 2131231116; + public const int notification_main_column = 2131231116; + + // aapt resource value: 0x7F08018D + public const int notification_main_column_container = 2131231117; // aapt resource value: 0x7F080006 public const int NO_DEBUG = 2131230726; - // aapt resource value: 0x7F08018D - public const int off = 2131231117; - // aapt resource value: 0x7F08018E - public const int omnibox_title_section = 2131231118; + public const int off = 2131231118; // aapt resource value: 0x7F08018F - public const int omnibox_url_section = 2131231119; + public const int omnibox_title_section = 2131231119; // aapt resource value: 0x7F080190 - public const int on = 2131231120; + public const int omnibox_url_section = 2131231120; // aapt resource value: 0x7F080191 - public const int outline = 2131231121; + public const int on = 2131231121; // aapt resource value: 0x7F080192 - public const int outward = 2131231122; + public const int outline = 2131231122; // aapt resource value: 0x7F080193 - public const int overshoot = 2131231123; + public const int outward = 2131231123; // aapt resource value: 0x7F080194 - public const int packed = 2131231124; + public const int overshoot = 2131231124; // aapt resource value: 0x7F080195 - public const int parallax = 2131231125; + public const int packed = 2131231125; // aapt resource value: 0x7F080196 - public const int parent = 2131231126; + public const int parallax = 2131231126; // aapt resource value: 0x7F080197 - public const int parentPanel = 2131231127; + public const int parent = 2131231127; // aapt resource value: 0x7F080198 - public const int parentRelative = 2131231128; + public const int parentPanel = 2131231128; // aapt resource value: 0x7F080199 - public const int parent_matrix = 2131231129; + public const int parentRelative = 2131231129; // aapt resource value: 0x7F08019A - public const int password_toggle = 2131231130; + public const int parent_matrix = 2131231130; // aapt resource value: 0x7F08019B - public const int path = 2131231131; + public const int password_toggle = 2131231131; // aapt resource value: 0x7F08019C - public const int pathRelative = 2131231132; + public const int path = 2131231132; // aapt resource value: 0x7F08019D - public const int peekHeight = 2131231133; + public const int pathRelative = 2131231133; // aapt resource value: 0x7F08019E - public const int percent = 2131231134; + public const int peekHeight = 2131231134; // aapt resource value: 0x7F08019F - public const int pin = 2131231135; + public const int percent = 2131231135; // aapt resource value: 0x7F0801A0 - public const int plain = 2131231136; + public const int pin = 2131231136; // aapt resource value: 0x7F0801A1 - public const int position = 2131231137; + public const int plain = 2131231137; // aapt resource value: 0x7F0801A2 - public const int postLayout = 2131231138; + public const int pooling_container_listener_holder_tag = 2131231138; // aapt resource value: 0x7F0801A3 - public const int progress_circular = 2131231139; + public const int position = 2131231139; // aapt resource value: 0x7F0801A4 - public const int progress_horizontal = 2131231140; + public const int postLayout = 2131231140; // aapt resource value: 0x7F0801A5 - public const int radio = 2131231141; + public const int progress_circular = 2131231141; // aapt resource value: 0x7F0801A6 - public const int ratio = 2131231142; + public const int progress_horizontal = 2131231142; // aapt resource value: 0x7F0801A7 - public const int rectangles = 2131231143; + public const int radio = 2131231143; // aapt resource value: 0x7F0801A8 - public const int recycler_view = 2131231144; + public const int ratio = 2131231144; // aapt resource value: 0x7F0801A9 - public const int reverseSawtooth = 2131231145; + public const int rectangles = 2131231145; // aapt resource value: 0x7F0801AA - public const int rfc822 = 2131231146; + public const int recycler_view = 2131231146; // aapt resource value: 0x7F0801AB - public const int right = 2131231147; + public const int reverseSawtooth = 2131231147; // aapt resource value: 0x7F0801AC - public const int rightToLeft = 2131231148; + public const int rfc822 = 2131231148; // aapt resource value: 0x7F0801AD - public const int right_icon = 2131231149; + public const int right = 2131231149; // aapt resource value: 0x7F0801AE - public const int right_side = 2131231150; + public const int rightToLeft = 2131231150; // aapt resource value: 0x7F0801AF - public const int rounded = 2131231151; + public const int right_icon = 2131231151; // aapt resource value: 0x7F0801B0 - public const int row_index_key = 2131231152; + public const int right_side = 2131231152; // aapt resource value: 0x7F0801B1 - public const int satellite = 2131231153; + public const int rounded = 2131231153; // aapt resource value: 0x7F0801B2 - public const int save_non_transition_alpha = 2131231154; + public const int row_index_key = 2131231154; // aapt resource value: 0x7F0801B3 - public const int save_overlay_view = 2131231155; + public const int satellite = 2131231155; // aapt resource value: 0x7F0801B4 - public const int sawtooth = 2131231156; + public const int save_non_transition_alpha = 2131231156; // aapt resource value: 0x7F0801B5 - public const int scale = 2131231157; + public const int save_overlay_view = 2131231157; // aapt resource value: 0x7F0801B6 - public const int screen = 2131231158; + public const int sawtooth = 2131231158; // aapt resource value: 0x7F0801B7 - public const int scroll = 2131231159; - - // aapt resource value: 0x7F0801BB - public const int scrollable = 2131231163; + public const int scale = 2131231159; // aapt resource value: 0x7F0801B8 - public const int scrollIndicatorDown = 2131231160; + public const int screen = 2131231160; // aapt resource value: 0x7F0801B9 - public const int scrollIndicatorUp = 2131231161; - - // aapt resource value: 0x7F0801BA - public const int scrollView = 2131231162; - - // aapt resource value: 0x7F0801BC - public const int search_badge = 2131231164; + public const int scroll = 2131231161; // aapt resource value: 0x7F0801BD - public const int search_bar = 2131231165; + public const int scrollable = 2131231165; + + // aapt resource value: 0x7F0801BA + public const int scrollIndicatorDown = 2131231162; + + // aapt resource value: 0x7F0801BB + public const int scrollIndicatorUp = 2131231163; + + // aapt resource value: 0x7F0801BC + public const int scrollView = 2131231164; // aapt resource value: 0x7F0801BE - public const int search_button = 2131231166; + public const int search_badge = 2131231166; // aapt resource value: 0x7F0801BF - public const int search_close_btn = 2131231167; + public const int search_bar = 2131231167; // aapt resource value: 0x7F0801C0 - public const int search_edit_frame = 2131231168; + public const int search_button = 2131231168; // aapt resource value: 0x7F0801C1 - public const int search_go_btn = 2131231169; + public const int search_close_btn = 2131231169; // aapt resource value: 0x7F0801C2 - public const int search_mag_icon = 2131231170; + public const int search_edit_frame = 2131231170; // aapt resource value: 0x7F0801C3 - public const int search_plate = 2131231171; + public const int search_go_btn = 2131231171; // aapt resource value: 0x7F0801C4 - public const int search_src_text = 2131231172; + public const int search_mag_icon = 2131231172; // aapt resource value: 0x7F0801C5 - public const int search_voice_btn = 2131231173; + public const int search_plate = 2131231173; // aapt resource value: 0x7F0801C6 - public const int seekbar = 2131231174; + public const int search_src_text = 2131231174; // aapt resource value: 0x7F0801C7 - public const int seekbar_value = 2131231175; - - // aapt resource value: 0x7F0801C9 - public const int selected = 2131231177; - - // aapt resource value: 0x7F0801CA - public const int selection_type = 2131231178; + public const int search_voice_btn = 2131231175; // aapt resource value: 0x7F0801C8 - public const int select_dialog_listview = 2131231176; + public const int seekbar = 2131231176; + + // aapt resource value: 0x7F0801C9 + public const int seekbar_value = 2131231177; // aapt resource value: 0x7F0801CB - public const int sharedValueSet = 2131231179; + public const int selected = 2131231179; // aapt resource value: 0x7F0801CC - public const int sharedValueUnset = 2131231180; + public const int selection_type = 2131231180; + + // aapt resource value: 0x7F0801CA + public const int select_dialog_listview = 2131231178; // aapt resource value: 0x7F0801CD - public const int shellcontent_appbar = 2131231181; + public const int sharedValueSet = 2131231181; // aapt resource value: 0x7F0801CE - public const int shellcontent_toolbar = 2131231182; + public const int sharedValueUnset = 2131231182; + + // aapt resource value: 0x7F0801CF + public const int shellcontent_appbar = 2131231183; + + // aapt resource value: 0x7F0801D0 + public const int shellcontent_toolbar = 2131231184; // aapt resource value: 0x7F080007 public const int SHIFT = 2131230727; - // aapt resource value: 0x7F0801CF - public const int shortcut = 2131231183; - - // aapt resource value: 0x7F0801D0 - public const int showCustom = 2131231184; - // aapt resource value: 0x7F0801D1 - public const int showHome = 2131231185; + public const int shortcut = 2131231185; // aapt resource value: 0x7F0801D2 - public const int showTitle = 2131231186; + public const int showCustom = 2131231186; + + // aapt resource value: 0x7F0801D3 + public const int showHome = 2131231187; + + // aapt resource value: 0x7F0801D4 + public const int showTitle = 2131231188; // aapt resource value: 0x7F080008 public const int SHOW_ALL = 2131230728; @@ -25583,251 +25589,251 @@ namespace TINK.Droid // aapt resource value: 0x7F08000A public const int SHOW_PROGRESS = 2131230730; - // aapt resource value: 0x7F0801D3 - public const int sin = 2131231187; - - // aapt resource value: 0x7F0801D4 - public const int skipCollapsed = 2131231188; - // aapt resource value: 0x7F0801D5 - public const int skipped = 2131231189; + public const int sin = 2131231189; // aapt resource value: 0x7F0801D6 - public const int slide = 2131231190; + public const int skipCollapsed = 2131231190; // aapt resource value: 0x7F0801D7 - public const int sliding_tabs = 2131231191; + public const int skipped = 2131231191; // aapt resource value: 0x7F0801D8 - public const int snackbar_action = 2131231192; + public const int slide = 2131231192; // aapt resource value: 0x7F0801D9 - public const int snackbar_text = 2131231193; + public const int sliding_tabs = 2131231193; // aapt resource value: 0x7F0801DA - public const int snap = 2131231194; + public const int snackbar_action = 2131231194; // aapt resource value: 0x7F0801DB - public const int snapMargins = 2131231195; + public const int snackbar_text = 2131231195; // aapt resource value: 0x7F0801DC - public const int south = 2131231196; + public const int snap = 2131231196; // aapt resource value: 0x7F0801DD - public const int spacer = 2131231197; + public const int snapMargins = 2131231197; // aapt resource value: 0x7F0801DE - public const int special_effects_controller_view_tag = 2131231198; + public const int south = 2131231198; // aapt resource value: 0x7F0801DF - public const int spinner = 2131231199; + public const int spacer = 2131231199; // aapt resource value: 0x7F0801E0 - public const int spline = 2131231200; + public const int special_effects_controller_view_tag = 2131231200; // aapt resource value: 0x7F0801E1 - public const int split_action_bar = 2131231201; + public const int spinner = 2131231201; // aapt resource value: 0x7F0801E2 - public const int spread = 2131231202; + public const int spline = 2131231202; // aapt resource value: 0x7F0801E3 - public const int spread_inside = 2131231203; + public const int split_action_bar = 2131231203; // aapt resource value: 0x7F0801E4 - public const int spring = 2131231204; + public const int spread = 2131231204; // aapt resource value: 0x7F0801E5 - public const int square = 2131231205; + public const int spread_inside = 2131231205; // aapt resource value: 0x7F0801E6 - public const int src_atop = 2131231206; + public const int spring = 2131231206; // aapt resource value: 0x7F0801E7 - public const int src_in = 2131231207; + public const int square = 2131231207; // aapt resource value: 0x7F0801E8 - public const int src_over = 2131231208; + public const int src_atop = 2131231208; // aapt resource value: 0x7F0801E9 - public const int standard = 2131231209; + public const int src_in = 2131231209; // aapt resource value: 0x7F0801EA - public const int start = 2131231210; + public const int src_over = 2131231210; // aapt resource value: 0x7F0801EB - public const int startHorizontal = 2131231211; + public const int standard = 2131231211; // aapt resource value: 0x7F0801EC - public const int startToEnd = 2131231212; + public const int start = 2131231212; // aapt resource value: 0x7F0801ED - public const int startVertical = 2131231213; + public const int startHorizontal = 2131231213; // aapt resource value: 0x7F0801EE - public const int staticLayout = 2131231214; + public const int startToEnd = 2131231214; // aapt resource value: 0x7F0801EF - public const int staticPostLayout = 2131231215; + public const int startVertical = 2131231215; // aapt resource value: 0x7F0801F0 - public const int status_bar_latest_event_content = 2131231216; + public const int staticLayout = 2131231216; // aapt resource value: 0x7F0801F1 - public const int stop = 2131231217; + public const int staticPostLayout = 2131231217; // aapt resource value: 0x7F0801F2 - public const int stretch = 2131231218; + public const int status_bar_latest_event_content = 2131231218; // aapt resource value: 0x7F0801F3 - public const int submenuarrow = 2131231219; + public const int stop = 2131231219; // aapt resource value: 0x7F0801F4 - public const int submit_area = 2131231220; + public const int stretch = 2131231220; // aapt resource value: 0x7F0801F5 - public const int supportScrollUp = 2131231221; + public const int submenuarrow = 2131231221; // aapt resource value: 0x7F0801F6 - public const int switchWidget = 2131231222; + public const int submit_area = 2131231222; + + // aapt resource value: 0x7F0801F7 + public const int supportScrollUp = 2131231223; + + // aapt resource value: 0x7F0801F8 + public const int switchWidget = 2131231224; // aapt resource value: 0x7F08000B public const int SYM = 2131230731; - // aapt resource value: 0x7F0801F7 - public const int tabMode = 2131231223; - - // aapt resource value: 0x7F0801F8 - public const int tag_accessibility_actions = 2131231224; - // aapt resource value: 0x7F0801F9 - public const int tag_accessibility_clickable_spans = 2131231225; + public const int tabMode = 2131231225; // aapt resource value: 0x7F0801FA - public const int tag_accessibility_heading = 2131231226; + public const int tag_accessibility_actions = 2131231226; // aapt resource value: 0x7F0801FB - public const int tag_accessibility_pane_title = 2131231227; + public const int tag_accessibility_clickable_spans = 2131231227; // aapt resource value: 0x7F0801FC - public const int tag_on_apply_window_listener = 2131231228; + public const int tag_accessibility_heading = 2131231228; // aapt resource value: 0x7F0801FD - public const int tag_on_receive_content_listener = 2131231229; + public const int tag_accessibility_pane_title = 2131231229; // aapt resource value: 0x7F0801FE - public const int tag_on_receive_content_mime_types = 2131231230; + public const int tag_on_apply_window_listener = 2131231230; // aapt resource value: 0x7F0801FF - public const int tag_screen_reader_focusable = 2131231231; + public const int tag_on_receive_content_listener = 2131231231; // aapt resource value: 0x7F080200 - public const int tag_state_description = 2131231232; + public const int tag_on_receive_content_mime_types = 2131231232; // aapt resource value: 0x7F080201 - public const int tag_transition_group = 2131231233; + public const int tag_screen_reader_focusable = 2131231233; // aapt resource value: 0x7F080202 - public const int tag_unhandled_key_event_manager = 2131231234; + public const int tag_state_description = 2131231234; // aapt resource value: 0x7F080203 - public const int tag_unhandled_key_listeners = 2131231235; + public const int tag_transition_group = 2131231235; // aapt resource value: 0x7F080204 - public const int tag_window_insets_animation_callback = 2131231236; + public const int tag_unhandled_key_event_manager = 2131231236; // aapt resource value: 0x7F080205 - public const int terrain = 2131231237; + public const int tag_unhandled_key_listeners = 2131231237; // aapt resource value: 0x7F080206 - public const int test_checkbox_android_button_tint = 2131231238; + public const int tag_window_insets_animation_callback = 2131231238; // aapt resource value: 0x7F080207 - public const int test_checkbox_app_button_tint = 2131231239; + public const int terrain = 2131231239; // aapt resource value: 0x7F080208 - public const int test_radiobutton_android_button_tint = 2131231240; + public const int test_checkbox_android_button_tint = 2131231240; // aapt resource value: 0x7F080209 - public const int test_radiobutton_app_button_tint = 2131231241; + public const int test_checkbox_app_button_tint = 2131231241; // aapt resource value: 0x7F08020A - public const int text = 2131231242; + public const int test_radiobutton_android_button_tint = 2131231242; // aapt resource value: 0x7F08020B - public const int text1 = 2131231243; + public const int test_radiobutton_app_button_tint = 2131231243; // aapt resource value: 0x7F08020C - public const int text2 = 2131231244; + public const int text = 2131231244; // aapt resource value: 0x7F08020D - public const int textEnd = 2131231245; - - // aapt resource value: 0x7F080215 - public const int textinput_counter = 2131231253; - - // aapt resource value: 0x7F080216 - public const int textinput_error = 2131231254; - - // aapt resource value: 0x7F080217 - public const int textinput_helper_text = 2131231255; - - // aapt resource value: 0x7F080218 - public const int textinput_placeholder = 2131231256; - - // aapt resource value: 0x7F080219 - public const int textinput_prefix_text = 2131231257; - - // aapt resource value: 0x7F08021A - public const int textinput_suffix_text = 2131231258; + public const int text1 = 2131231245; // aapt resource value: 0x7F08020E - public const int textSpacerNoButtons = 2131231246; + public const int text2 = 2131231246; // aapt resource value: 0x7F08020F - public const int textSpacerNoTitle = 2131231247; + public const int textEnd = 2131231247; - // aapt resource value: 0x7F080210 - public const int textStart = 2131231248; + // aapt resource value: 0x7F080217 + public const int textinput_counter = 2131231255; - // aapt resource value: 0x7F080211 - public const int textTop = 2131231249; + // aapt resource value: 0x7F080218 + public const int textinput_error = 2131231256; - // aapt resource value: 0x7F080212 - public const int text_input_end_icon = 2131231250; + // aapt resource value: 0x7F080219 + public const int textinput_helper_text = 2131231257; - // aapt resource value: 0x7F080213 - public const int text_input_error_icon = 2131231251; - - // aapt resource value: 0x7F080214 - public const int text_input_start_icon = 2131231252; + // aapt resource value: 0x7F08021A + public const int textinput_placeholder = 2131231258; // aapt resource value: 0x7F08021B - public const int thing_proto = 2131231259; + public const int textinput_prefix_text = 2131231259; // aapt resource value: 0x7F08021C - public const int time = 2131231260; + public const int textinput_suffix_text = 2131231260; + + // aapt resource value: 0x7F080210 + public const int textSpacerNoButtons = 2131231248; + + // aapt resource value: 0x7F080211 + public const int textSpacerNoTitle = 2131231249; + + // aapt resource value: 0x7F080212 + public const int textStart = 2131231250; + + // aapt resource value: 0x7F080213 + public const int textTop = 2131231251; + + // aapt resource value: 0x7F080214 + public const int text_input_end_icon = 2131231252; + + // aapt resource value: 0x7F080215 + public const int text_input_error_icon = 2131231253; + + // aapt resource value: 0x7F080216 + public const int text_input_start_icon = 2131231254; // aapt resource value: 0x7F08021D - public const int title = 2131231261; + public const int thing_proto = 2131231261; // aapt resource value: 0x7F08021E - public const int titleDividerNoCustom = 2131231262; + public const int time = 2131231262; // aapt resource value: 0x7F08021F - public const int title_template = 2131231263; + public const int title = 2131231263; // aapt resource value: 0x7F080220 - public const int toggle = 2131231264; + public const int titleDividerNoCustom = 2131231264; // aapt resource value: 0x7F080221 - public const int toolbar = 2131231265; + public const int title_template = 2131231265; // aapt resource value: 0x7F080222 - public const int top = 2131231266; + public const int toggle = 2131231266; // aapt resource value: 0x7F080223 - public const int topPanel = 2131231267; + public const int toolbar = 2131231267; + + // aapt resource value: 0x7F080224 + public const int top = 2131231268; + + // aapt resource value: 0x7F080225 + public const int topPanel = 2131231269; // aapt resource value: 0x7F08000C public const int TOP_END = 2131230732; @@ -25835,113 +25841,113 @@ namespace TINK.Droid // aapt resource value: 0x7F08000D public const int TOP_START = 2131230733; - // aapt resource value: 0x7F080224 - public const int touch_outside = 2131231268; - - // aapt resource value: 0x7F080225 - public const int transitionToEnd = 2131231269; - // aapt resource value: 0x7F080226 - public const int transitionToStart = 2131231270; + public const int touch_outside = 2131231270; // aapt resource value: 0x7F080227 - public const int transition_current_scene = 2131231271; + public const int transitionToEnd = 2131231271; // aapt resource value: 0x7F080228 - public const int transition_layout_save = 2131231272; + public const int transitionToStart = 2131231272; // aapt resource value: 0x7F080229 - public const int transition_position = 2131231273; + public const int transition_current_scene = 2131231273; // aapt resource value: 0x7F08022A - public const int transition_scene_layoutid_cache = 2131231274; + public const int transition_layout_save = 2131231274; // aapt resource value: 0x7F08022B - public const int transition_transform = 2131231275; + public const int transition_position = 2131231275; // aapt resource value: 0x7F08022C - public const int triangle = 2131231276; + public const int transition_scene_layoutid_cache = 2131231276; // aapt resource value: 0x7F08022D - public const int @unchecked = 2131231277; + public const int transition_transform = 2131231277; // aapt resource value: 0x7F08022E - public const int uniform = 2131231278; + public const int triangle = 2131231278; // aapt resource value: 0x7F08022F - public const int unlabeled = 2131231279; + public const int @unchecked = 2131231279; // aapt resource value: 0x7F080230 - public const int up = 2131231280; + public const int uniform = 2131231280; // aapt resource value: 0x7F080231 - public const int url = 2131231281; + public const int unlabeled = 2131231281; // aapt resource value: 0x7F080232 - public const int useLogo = 2131231282; + public const int up = 2131231282; // aapt resource value: 0x7F080233 - public const int vertical_only = 2131231283; + public const int url = 2131231283; // aapt resource value: 0x7F080234 - public const int view_offset_helper = 2131231284; + public const int useLogo = 2131231284; // aapt resource value: 0x7F080235 - public const int view_transition = 2131231285; + public const int vertical_only = 2131231285; // aapt resource value: 0x7F080236 - public const int view_tree_lifecycle_owner = 2131231286; + public const int view_offset_helper = 2131231286; // aapt resource value: 0x7F080237 - public const int view_tree_on_back_pressed_dispatcher_owner = 2131231287; + public const int view_transition = 2131231287; // aapt resource value: 0x7F080238 - public const int view_tree_saved_state_registry_owner = 2131231288; + public const int view_tree_lifecycle_owner = 2131231288; // aapt resource value: 0x7F080239 - public const int view_tree_view_model_store_owner = 2131231289; + public const int view_tree_on_back_pressed_dispatcher_owner = 2131231289; // aapt resource value: 0x7F08023A - public const int visible = 2131231290; + public const int view_tree_saved_state_registry_owner = 2131231290; // aapt resource value: 0x7F08023B - public const int visible_removing_fragment_view_tag = 2131231291; + public const int view_tree_view_model_store_owner = 2131231291; // aapt resource value: 0x7F08023C - public const int volume_item_container = 2131231292; + public const int visible = 2131231292; // aapt resource value: 0x7F08023D - public const int webview = 2131231293; + public const int visible_removing_fragment_view_tag = 2131231293; // aapt resource value: 0x7F08023E - public const int west = 2131231294; + public const int volume_item_container = 2131231294; // aapt resource value: 0x7F08023F - public const int wide = 2131231295; - - // aapt resource value: 0x7F080241 - public const int withinBounds = 2131231297; + public const int webview = 2131231295; // aapt resource value: 0x7F080240 - public const int withText = 2131231296; + public const int west = 2131231296; - // aapt resource value: 0x7F080242 - public const int wrap = 2131231298; + // aapt resource value: 0x7F080241 + public const int wide = 2131231297; // aapt resource value: 0x7F080243 - public const int wrap_content = 2131231299; + public const int withinBounds = 2131231299; + + // aapt resource value: 0x7F080242 + public const int withText = 2131231298; // aapt resource value: 0x7F080244 - public const int wrap_content_constrained = 2131231300; + public const int wrap = 2131231300; // aapt resource value: 0x7F080245 - public const int x_left = 2131231301; + public const int wrap_content = 2131231301; // aapt resource value: 0x7F080246 - public const int x_right = 2131231302; + public const int wrap_content_constrained = 2131231302; // aapt resource value: 0x7F080247 - public const int zero_corner_chip = 2131231303; + public const int x_left = 2131231303; + + // aapt resource value: 0x7F080248 + public const int x_right = 2131231304; + + // aapt resource value: 0x7F080249 + public const int zero_corner_chip = 2131231305; static Id() { diff --git a/LastenradBayern/TINK.iOS/Info.plist b/LastenradBayern/TINK.iOS/Info.plist index bd58ee7..d39ac4d 100644 --- a/LastenradBayern/TINK.iOS/Info.plist +++ b/LastenradBayern/TINK.iOS/Info.plist @@ -56,8 +56,8 @@ CFBundleDisplayName LastenradBayern CFBundleVersion - 361 + 362 CFBundleShortVersionString - 3.0.361 + 3.0.362 diff --git a/LastenradBayern/TINK.iOS/LastenradBayern.iOS.csproj b/LastenradBayern/TINK.iOS/LastenradBayern.iOS.csproj index 8315c9d..b3c3b1c 100644 --- a/LastenradBayern/TINK.iOS/LastenradBayern.iOS.csproj +++ b/LastenradBayern/TINK.iOS/LastenradBayern.iOS.csproj @@ -120,7 +120,7 @@ - + 1.6.3 @@ -129,7 +129,7 @@ 1.6.3 - + @@ -220,7 +220,7 @@ 0.7.124 - 5.0.0.2545 + 5.0.0.2578 diff --git a/LastenradBayern/TINK/App.xaml.cs b/LastenradBayern/TINK/App.xaml.cs index 4736382..dc6c00e 100644 --- a/LastenradBayern/TINK/App.xaml.cs +++ b/LastenradBayern/TINK/App.xaml.cs @@ -338,9 +338,9 @@ namespace TINK /// /// Service container to manage geolocation services. /// - public static IServicesContainer LocationServicesContainer { get; } - = new ServicesContainerMutableT( - new HashSet { + public static IServicesContainer LocationServicesContainer { get; } + = new ServicesContainerMutableT( + new HashSet { new LastKnownGeolocationService(DependencyService.Get()), new SimulatedGeolocationService(DependencyService.Get()), new GeolocationAccuracyMediumService(DependencyService.Get()), diff --git a/LockItShared/LockItShared.csproj b/LockItShared/LockItShared.csproj index 3169c5a..6610653 100644 --- a/LockItShared/LockItShared.csproj +++ b/LockItShared/LockItShared.csproj @@ -22,7 +22,7 @@ - + diff --git a/Meinkonrad/TINK.Android/Meinkonrad.Android.csproj b/Meinkonrad/TINK.Android/Meinkonrad.Android.csproj index a29ab4b..491383c 100644 --- a/Meinkonrad/TINK.Android/Meinkonrad.Android.csproj +++ b/Meinkonrad/TINK.Android/Meinkonrad.Android.csproj @@ -77,7 +77,7 @@ - + 1.6.3 @@ -86,7 +86,7 @@ 1.6.3 - + @@ -185,7 +185,7 @@ 1.0.0.16 - 1.2.1.9 + 1.3.0 @@ -195,9 +195,9 @@ 1.7.5 - + - 5.0.0.2545 + 5.0.0.2578 5.0.0 diff --git a/Meinkonrad/TINK.Android/Properties/AndroidManifest.xml b/Meinkonrad/TINK.Android/Properties/AndroidManifest.xml index e6aea39..a1080a1 100644 --- a/Meinkonrad/TINK.Android/Properties/AndroidManifest.xml +++ b/Meinkonrad/TINK.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/Meinkonrad/TINK.Android/Resources/Resource.Designer.cs b/Meinkonrad/TINK.Android/Resources/Resource.Designer.cs index 67a528c..e07ab0f 100644 --- a/Meinkonrad/TINK.Android/Resources/Resource.Designer.cs +++ b/Meinkonrad/TINK.Android/Resources/Resource.Designer.cs @@ -24951,670 +24951,676 @@ namespace TINK.Droid public const int inward = 2131230967; // aapt resource value: 0x7F0800F8 - public const int italic = 2131230968; + public const int is_pooling_container_tag = 2131230968; // aapt resource value: 0x7F0800F9 - public const int item_touch_helper_previous_elevation = 2131230969; + public const int italic = 2131230969; // aapt resource value: 0x7F0800FA - public const int jumpToEnd = 2131230970; + public const int item_touch_helper_previous_elevation = 2131230970; // aapt resource value: 0x7F0800FB - public const int jumpToStart = 2131230971; + public const int jumpToEnd = 2131230971; // aapt resource value: 0x7F0800FC - public const int labeled = 2131230972; + public const int jumpToStart = 2131230972; // aapt resource value: 0x7F0800FD - public const int large_icon_uri = 2131230973; + public const int labeled = 2131230973; // aapt resource value: 0x7F0800FE - public const int layout = 2131230974; + public const int large_icon_uri = 2131230974; // aapt resource value: 0x7F0800FF - public const int left = 2131230975; + public const int layout = 2131230975; // aapt resource value: 0x7F080100 - public const int leftToRight = 2131230976; + public const int left = 2131230976; // aapt resource value: 0x7F080101 - public const int legacy = 2131230977; + public const int leftToRight = 2131230977; // aapt resource value: 0x7F080102 - public const int light = 2131230978; + public const int legacy = 2131230978; // aapt resource value: 0x7F080103 - public const int line1 = 2131230979; + public const int light = 2131230979; // aapt resource value: 0x7F080104 - public const int line3 = 2131230980; + public const int line1 = 2131230980; // aapt resource value: 0x7F080105 - public const int linear = 2131230981; + public const int line3 = 2131230981; // aapt resource value: 0x7F080106 - public const int listMode = 2131230982; + public const int linear = 2131230982; // aapt resource value: 0x7F080107 - public const int list_item = 2131230983; + public const int listMode = 2131230983; // aapt resource value: 0x7F080108 - public const int main_appbar = 2131230984; + public const int list_item = 2131230984; // aapt resource value: 0x7F080109 - public const int main_tablayout = 2131230985; + public const int main_appbar = 2131230985; // aapt resource value: 0x7F08010A - public const int main_toolbar = 2131230986; + public const int main_tablayout = 2131230986; // aapt resource value: 0x7F08010B - public const int main_viewpager = 2131230987; + public const int main_toolbar = 2131230987; // aapt resource value: 0x7F08010C - public const int masked = 2131230988; + public const int main_viewpager = 2131230988; // aapt resource value: 0x7F08010D - public const int match_constraint = 2131230989; + public const int masked = 2131230989; // aapt resource value: 0x7F08010E - public const int match_global_nicknames = 2131230990; + public const int match_constraint = 2131230990; // aapt resource value: 0x7F08010F - public const int match_parent = 2131230991; + public const int match_global_nicknames = 2131230991; // aapt resource value: 0x7F080110 - public const int material_clock_display = 2131230992; + public const int match_parent = 2131230992; // aapt resource value: 0x7F080111 - public const int material_clock_face = 2131230993; + public const int material_clock_display = 2131230993; // aapt resource value: 0x7F080112 - public const int material_clock_hand = 2131230994; + public const int material_clock_face = 2131230994; // aapt resource value: 0x7F080113 - public const int material_clock_period_am_button = 2131230995; + public const int material_clock_hand = 2131230995; // aapt resource value: 0x7F080114 - public const int material_clock_period_pm_button = 2131230996; + public const int material_clock_period_am_button = 2131230996; // aapt resource value: 0x7F080115 - public const int material_clock_period_toggle = 2131230997; + public const int material_clock_period_pm_button = 2131230997; // aapt resource value: 0x7F080116 - public const int material_hour_text_input = 2131230998; + public const int material_clock_period_toggle = 2131230998; // aapt resource value: 0x7F080117 - public const int material_hour_tv = 2131230999; + public const int material_hour_text_input = 2131230999; // aapt resource value: 0x7F080118 - public const int material_label = 2131231000; + public const int material_hour_tv = 2131231000; // aapt resource value: 0x7F080119 - public const int material_minute_text_input = 2131231001; + public const int material_label = 2131231001; // aapt resource value: 0x7F08011A - public const int material_minute_tv = 2131231002; + public const int material_minute_text_input = 2131231002; // aapt resource value: 0x7F08011B - public const int material_textinput_timepicker = 2131231003; + public const int material_minute_tv = 2131231003; // aapt resource value: 0x7F08011C - public const int material_timepicker_cancel_button = 2131231004; + public const int material_textinput_timepicker = 2131231004; // aapt resource value: 0x7F08011D - public const int material_timepicker_container = 2131231005; + public const int material_timepicker_cancel_button = 2131231005; // aapt resource value: 0x7F08011E - public const int material_timepicker_edit_text = 2131231006; + public const int material_timepicker_container = 2131231006; // aapt resource value: 0x7F08011F - public const int material_timepicker_mode_button = 2131231007; + public const int material_timepicker_edit_text = 2131231007; // aapt resource value: 0x7F080120 - public const int material_timepicker_ok_button = 2131231008; + public const int material_timepicker_mode_button = 2131231008; // aapt resource value: 0x7F080121 - public const int material_timepicker_view = 2131231009; + public const int material_timepicker_ok_button = 2131231009; // aapt resource value: 0x7F080122 - public const int material_value_index = 2131231010; + public const int material_timepicker_view = 2131231010; // aapt resource value: 0x7F080123 - public const int media_actions = 2131231011; + public const int material_value_index = 2131231011; // aapt resource value: 0x7F080124 - public const int media_controller_compat_view_tag = 2131231012; + public const int media_actions = 2131231012; // aapt resource value: 0x7F080125 - public const int message = 2131231013; + public const int media_controller_compat_view_tag = 2131231013; + + // aapt resource value: 0x7F080126 + public const int message = 2131231014; // aapt resource value: 0x7F080005 public const int META = 2131230725; - // aapt resource value: 0x7F080126 - public const int middle = 2131231014; - // aapt resource value: 0x7F080127 - public const int mini = 2131231015; + public const int middle = 2131231015; // aapt resource value: 0x7F080128 - public const int month_grid = 2131231016; + public const int mini = 2131231016; // aapt resource value: 0x7F080129 - public const int month_navigation_bar = 2131231017; + public const int month_grid = 2131231017; // aapt resource value: 0x7F08012A - public const int month_navigation_fragment_toggle = 2131231018; + public const int month_navigation_bar = 2131231018; // aapt resource value: 0x7F08012B - public const int month_navigation_next = 2131231019; + public const int month_navigation_fragment_toggle = 2131231019; // aapt resource value: 0x7F08012C - public const int month_navigation_previous = 2131231020; + public const int month_navigation_next = 2131231020; // aapt resource value: 0x7F08012D - public const int month_title = 2131231021; + public const int month_navigation_previous = 2131231021; // aapt resource value: 0x7F08012E - public const int motion_base = 2131231022; + public const int month_title = 2131231022; // aapt resource value: 0x7F08012F - public const int mr_art = 2131231023; + public const int motion_base = 2131231023; // aapt resource value: 0x7F080130 - public const int mr_cast_checkbox = 2131231024; + public const int mr_art = 2131231024; // aapt resource value: 0x7F080131 - public const int mr_cast_close_button = 2131231025; + public const int mr_cast_checkbox = 2131231025; // aapt resource value: 0x7F080132 - public const int mr_cast_divider = 2131231026; + public const int mr_cast_close_button = 2131231026; // aapt resource value: 0x7F080133 - public const int mr_cast_group_icon = 2131231027; + public const int mr_cast_divider = 2131231027; // aapt resource value: 0x7F080134 - public const int mr_cast_group_name = 2131231028; + public const int mr_cast_group_icon = 2131231028; // aapt resource value: 0x7F080135 - public const int mr_cast_group_progress_bar = 2131231029; + public const int mr_cast_group_name = 2131231029; // aapt resource value: 0x7F080136 - public const int mr_cast_header_name = 2131231030; + public const int mr_cast_group_progress_bar = 2131231030; // aapt resource value: 0x7F080137 - public const int mr_cast_list = 2131231031; + public const int mr_cast_header_name = 2131231031; // aapt resource value: 0x7F080138 - public const int mr_cast_meta_art = 2131231032; + public const int mr_cast_list = 2131231032; // aapt resource value: 0x7F080139 - public const int mr_cast_meta_background = 2131231033; + public const int mr_cast_meta_art = 2131231033; // aapt resource value: 0x7F08013A - public const int mr_cast_meta_black_scrim = 2131231034; + public const int mr_cast_meta_background = 2131231034; // aapt resource value: 0x7F08013B - public const int mr_cast_meta_subtitle = 2131231035; + public const int mr_cast_meta_black_scrim = 2131231035; // aapt resource value: 0x7F08013C - public const int mr_cast_meta_title = 2131231036; + public const int mr_cast_meta_subtitle = 2131231036; // aapt resource value: 0x7F08013D - public const int mr_cast_mute_button = 2131231037; + public const int mr_cast_meta_title = 2131231037; // aapt resource value: 0x7F08013E - public const int mr_cast_route_icon = 2131231038; + public const int mr_cast_mute_button = 2131231038; // aapt resource value: 0x7F08013F - public const int mr_cast_route_name = 2131231039; + public const int mr_cast_route_icon = 2131231039; // aapt resource value: 0x7F080140 - public const int mr_cast_route_progress_bar = 2131231040; + public const int mr_cast_route_name = 2131231040; // aapt resource value: 0x7F080141 - public const int mr_cast_stop_button = 2131231041; + public const int mr_cast_route_progress_bar = 2131231041; // aapt resource value: 0x7F080142 - public const int mr_cast_volume_layout = 2131231042; + public const int mr_cast_stop_button = 2131231042; // aapt resource value: 0x7F080143 - public const int mr_cast_volume_slider = 2131231043; + public const int mr_cast_volume_layout = 2131231043; // aapt resource value: 0x7F080144 - public const int mr_chooser_list = 2131231044; + public const int mr_cast_volume_slider = 2131231044; // aapt resource value: 0x7F080145 - public const int mr_chooser_route_desc = 2131231045; + public const int mr_chooser_list = 2131231045; // aapt resource value: 0x7F080146 - public const int mr_chooser_route_icon = 2131231046; + public const int mr_chooser_route_desc = 2131231046; // aapt resource value: 0x7F080147 - public const int mr_chooser_route_name = 2131231047; + public const int mr_chooser_route_icon = 2131231047; // aapt resource value: 0x7F080148 - public const int mr_chooser_route_progress_bar = 2131231048; + public const int mr_chooser_route_name = 2131231048; // aapt resource value: 0x7F080149 - public const int mr_chooser_title = 2131231049; + public const int mr_chooser_route_progress_bar = 2131231049; // aapt resource value: 0x7F08014A - public const int mr_close = 2131231050; + public const int mr_chooser_title = 2131231050; // aapt resource value: 0x7F08014B - public const int mr_control_divider = 2131231051; + public const int mr_close = 2131231051; // aapt resource value: 0x7F08014C - public const int mr_control_playback_ctrl = 2131231052; + public const int mr_control_divider = 2131231052; // aapt resource value: 0x7F08014D - public const int mr_control_subtitle = 2131231053; + public const int mr_control_playback_ctrl = 2131231053; // aapt resource value: 0x7F08014E - public const int mr_control_title = 2131231054; + public const int mr_control_subtitle = 2131231054; // aapt resource value: 0x7F08014F - public const int mr_control_title_container = 2131231055; + public const int mr_control_title = 2131231055; // aapt resource value: 0x7F080150 - public const int mr_custom_control = 2131231056; + public const int mr_control_title_container = 2131231056; // aapt resource value: 0x7F080151 - public const int mr_default_control = 2131231057; + public const int mr_custom_control = 2131231057; // aapt resource value: 0x7F080152 - public const int mr_dialog_area = 2131231058; + public const int mr_default_control = 2131231058; // aapt resource value: 0x7F080153 - public const int mr_expandable_area = 2131231059; + public const int mr_dialog_area = 2131231059; // aapt resource value: 0x7F080154 - public const int mr_group_expand_collapse = 2131231060; + public const int mr_expandable_area = 2131231060; // aapt resource value: 0x7F080155 - public const int mr_group_volume_route_name = 2131231061; + public const int mr_group_expand_collapse = 2131231061; // aapt resource value: 0x7F080156 - public const int mr_media_main_control = 2131231062; + public const int mr_group_volume_route_name = 2131231062; // aapt resource value: 0x7F080157 - public const int mr_name = 2131231063; + public const int mr_media_main_control = 2131231063; // aapt resource value: 0x7F080158 - public const int mr_picker_close_button = 2131231064; + public const int mr_name = 2131231064; // aapt resource value: 0x7F080159 - public const int mr_picker_header_name = 2131231065; + public const int mr_picker_close_button = 2131231065; // aapt resource value: 0x7F08015A - public const int mr_picker_list = 2131231066; + public const int mr_picker_header_name = 2131231066; // aapt resource value: 0x7F08015B - public const int mr_picker_route_icon = 2131231067; + public const int mr_picker_list = 2131231067; // aapt resource value: 0x7F08015C - public const int mr_picker_route_name = 2131231068; + public const int mr_picker_route_icon = 2131231068; // aapt resource value: 0x7F08015D - public const int mr_picker_route_progress_bar = 2131231069; + public const int mr_picker_route_name = 2131231069; // aapt resource value: 0x7F08015E - public const int mr_playback_control = 2131231070; + public const int mr_picker_route_progress_bar = 2131231070; // aapt resource value: 0x7F08015F - public const int mr_title_bar = 2131231071; + public const int mr_playback_control = 2131231071; // aapt resource value: 0x7F080160 - public const int mr_volume_control = 2131231072; + public const int mr_title_bar = 2131231072; // aapt resource value: 0x7F080161 - public const int mr_volume_group_list = 2131231073; + public const int mr_volume_control = 2131231073; // aapt resource value: 0x7F080162 - public const int mr_volume_item_icon = 2131231074; + public const int mr_volume_group_list = 2131231074; // aapt resource value: 0x7F080163 - public const int mr_volume_slider = 2131231075; + public const int mr_volume_item_icon = 2131231075; // aapt resource value: 0x7F080164 - public const int mtrl_anchor_parent = 2131231076; - - // aapt resource value: 0x7F080166 - public const int mtrl_calendar_days_of_week = 2131231078; + public const int mr_volume_slider = 2131231076; // aapt resource value: 0x7F080165 - public const int mtrl_calendar_day_selector_frame = 2131231077; + public const int mtrl_anchor_parent = 2131231077; // aapt resource value: 0x7F080167 - public const int mtrl_calendar_frame = 2131231079; + public const int mtrl_calendar_days_of_week = 2131231079; + + // aapt resource value: 0x7F080166 + public const int mtrl_calendar_day_selector_frame = 2131231078; // aapt resource value: 0x7F080168 - public const int mtrl_calendar_main_pane = 2131231080; + public const int mtrl_calendar_frame = 2131231080; // aapt resource value: 0x7F080169 - public const int mtrl_calendar_months = 2131231081; + public const int mtrl_calendar_main_pane = 2131231081; // aapt resource value: 0x7F08016A - public const int mtrl_calendar_selection_frame = 2131231082; + public const int mtrl_calendar_months = 2131231082; // aapt resource value: 0x7F08016B - public const int mtrl_calendar_text_input_frame = 2131231083; + public const int mtrl_calendar_selection_frame = 2131231083; // aapt resource value: 0x7F08016C - public const int mtrl_calendar_year_selector_frame = 2131231084; + public const int mtrl_calendar_text_input_frame = 2131231084; // aapt resource value: 0x7F08016D - public const int mtrl_card_checked_layer_id = 2131231085; + public const int mtrl_calendar_year_selector_frame = 2131231085; // aapt resource value: 0x7F08016E - public const int mtrl_child_content_container = 2131231086; + public const int mtrl_card_checked_layer_id = 2131231086; // aapt resource value: 0x7F08016F - public const int mtrl_internal_children_alpha_tag = 2131231087; + public const int mtrl_child_content_container = 2131231087; // aapt resource value: 0x7F080170 - public const int mtrl_motion_snapshot_view = 2131231088; + public const int mtrl_internal_children_alpha_tag = 2131231088; // aapt resource value: 0x7F080171 - public const int mtrl_picker_fullscreen = 2131231089; + public const int mtrl_motion_snapshot_view = 2131231089; // aapt resource value: 0x7F080172 - public const int mtrl_picker_header = 2131231090; + public const int mtrl_picker_fullscreen = 2131231090; // aapt resource value: 0x7F080173 - public const int mtrl_picker_header_selection_text = 2131231091; + public const int mtrl_picker_header = 2131231091; // aapt resource value: 0x7F080174 - public const int mtrl_picker_header_title_and_selection = 2131231092; + public const int mtrl_picker_header_selection_text = 2131231092; // aapt resource value: 0x7F080175 - public const int mtrl_picker_header_toggle = 2131231093; + public const int mtrl_picker_header_title_and_selection = 2131231093; // aapt resource value: 0x7F080176 - public const int mtrl_picker_text_input_date = 2131231094; + public const int mtrl_picker_header_toggle = 2131231094; // aapt resource value: 0x7F080177 - public const int mtrl_picker_text_input_range_end = 2131231095; + public const int mtrl_picker_text_input_date = 2131231095; // aapt resource value: 0x7F080178 - public const int mtrl_picker_text_input_range_start = 2131231096; + public const int mtrl_picker_text_input_range_end = 2131231096; // aapt resource value: 0x7F080179 - public const int mtrl_picker_title_text = 2131231097; + public const int mtrl_picker_text_input_range_start = 2131231097; // aapt resource value: 0x7F08017A - public const int mtrl_view_tag_bottom_padding = 2131231098; + public const int mtrl_picker_title_text = 2131231098; // aapt resource value: 0x7F08017B - public const int multiply = 2131231099; - - // aapt resource value: 0x7F08017D - public const int navigation_bar_item_icon_view = 2131231101; - - // aapt resource value: 0x7F08017E - public const int navigation_bar_item_labels_group = 2131231102; - - // aapt resource value: 0x7F08017F - public const int navigation_bar_item_large_label_view = 2131231103; - - // aapt resource value: 0x7F080180 - public const int navigation_bar_item_small_label_view = 2131231104; - - // aapt resource value: 0x7F080181 - public const int navigation_header_container = 2131231105; + public const int mtrl_view_tag_bottom_padding = 2131231099; // aapt resource value: 0x7F08017C - public const int nav_controller_view_tag = 2131231100; + public const int multiply = 2131231100; + + // aapt resource value: 0x7F08017E + public const int navigation_bar_item_icon_view = 2131231102; + + // aapt resource value: 0x7F08017F + public const int navigation_bar_item_labels_group = 2131231103; + + // aapt resource value: 0x7F080180 + public const int navigation_bar_item_large_label_view = 2131231104; + + // aapt resource value: 0x7F080181 + public const int navigation_bar_item_small_label_view = 2131231105; // aapt resource value: 0x7F080182 - public const int never = 2131231106; + public const int navigation_header_container = 2131231106; + + // aapt resource value: 0x7F08017D + public const int nav_controller_view_tag = 2131231101; // aapt resource value: 0x7F080183 - public const int neverCompleteToEnd = 2131231107; + public const int never = 2131231107; // aapt resource value: 0x7F080184 - public const int neverCompleteToStart = 2131231108; - - // aapt resource value: 0x7F080187 - public const int none = 2131231111; - - // aapt resource value: 0x7F080188 - public const int normal = 2131231112; - - // aapt resource value: 0x7F080189 - public const int north = 2131231113; + public const int neverCompleteToEnd = 2131231108; // aapt resource value: 0x7F080185 - public const int noScroll = 2131231109; + public const int neverCompleteToStart = 2131231109; - // aapt resource value: 0x7F080186 - public const int noState = 2131231110; + // aapt resource value: 0x7F080188 + public const int none = 2131231112; + + // aapt resource value: 0x7F080189 + public const int normal = 2131231113; // aapt resource value: 0x7F08018A - public const int notification_background = 2131231114; + public const int north = 2131231114; + + // aapt resource value: 0x7F080186 + public const int noScroll = 2131231110; + + // aapt resource value: 0x7F080187 + public const int noState = 2131231111; // aapt resource value: 0x7F08018B - public const int notification_main_column = 2131231115; + public const int notification_background = 2131231115; // aapt resource value: 0x7F08018C - public const int notification_main_column_container = 2131231116; + public const int notification_main_column = 2131231116; + + // aapt resource value: 0x7F08018D + public const int notification_main_column_container = 2131231117; // aapt resource value: 0x7F080006 public const int NO_DEBUG = 2131230726; - // aapt resource value: 0x7F08018D - public const int off = 2131231117; - // aapt resource value: 0x7F08018E - public const int omnibox_title_section = 2131231118; + public const int off = 2131231118; // aapt resource value: 0x7F08018F - public const int omnibox_url_section = 2131231119; + public const int omnibox_title_section = 2131231119; // aapt resource value: 0x7F080190 - public const int on = 2131231120; + public const int omnibox_url_section = 2131231120; // aapt resource value: 0x7F080191 - public const int outline = 2131231121; + public const int on = 2131231121; // aapt resource value: 0x7F080192 - public const int outward = 2131231122; + public const int outline = 2131231122; // aapt resource value: 0x7F080193 - public const int overshoot = 2131231123; + public const int outward = 2131231123; // aapt resource value: 0x7F080194 - public const int packed = 2131231124; + public const int overshoot = 2131231124; // aapt resource value: 0x7F080195 - public const int parallax = 2131231125; + public const int packed = 2131231125; // aapt resource value: 0x7F080196 - public const int parent = 2131231126; + public const int parallax = 2131231126; // aapt resource value: 0x7F080197 - public const int parentPanel = 2131231127; + public const int parent = 2131231127; // aapt resource value: 0x7F080198 - public const int parentRelative = 2131231128; + public const int parentPanel = 2131231128; // aapt resource value: 0x7F080199 - public const int parent_matrix = 2131231129; + public const int parentRelative = 2131231129; // aapt resource value: 0x7F08019A - public const int password_toggle = 2131231130; + public const int parent_matrix = 2131231130; // aapt resource value: 0x7F08019B - public const int path = 2131231131; + public const int password_toggle = 2131231131; // aapt resource value: 0x7F08019C - public const int pathRelative = 2131231132; + public const int path = 2131231132; // aapt resource value: 0x7F08019D - public const int peekHeight = 2131231133; + public const int pathRelative = 2131231133; // aapt resource value: 0x7F08019E - public const int percent = 2131231134; + public const int peekHeight = 2131231134; // aapt resource value: 0x7F08019F - public const int pin = 2131231135; + public const int percent = 2131231135; // aapt resource value: 0x7F0801A0 - public const int plain = 2131231136; + public const int pin = 2131231136; // aapt resource value: 0x7F0801A1 - public const int position = 2131231137; + public const int plain = 2131231137; // aapt resource value: 0x7F0801A2 - public const int postLayout = 2131231138; + public const int pooling_container_listener_holder_tag = 2131231138; // aapt resource value: 0x7F0801A3 - public const int progress_circular = 2131231139; + public const int position = 2131231139; // aapt resource value: 0x7F0801A4 - public const int progress_horizontal = 2131231140; + public const int postLayout = 2131231140; // aapt resource value: 0x7F0801A5 - public const int radio = 2131231141; + public const int progress_circular = 2131231141; // aapt resource value: 0x7F0801A6 - public const int ratio = 2131231142; + public const int progress_horizontal = 2131231142; // aapt resource value: 0x7F0801A7 - public const int rectangles = 2131231143; + public const int radio = 2131231143; // aapt resource value: 0x7F0801A8 - public const int recycler_view = 2131231144; + public const int ratio = 2131231144; // aapt resource value: 0x7F0801A9 - public const int reverseSawtooth = 2131231145; + public const int rectangles = 2131231145; // aapt resource value: 0x7F0801AA - public const int rfc822 = 2131231146; + public const int recycler_view = 2131231146; // aapt resource value: 0x7F0801AB - public const int right = 2131231147; + public const int reverseSawtooth = 2131231147; // aapt resource value: 0x7F0801AC - public const int rightToLeft = 2131231148; + public const int rfc822 = 2131231148; // aapt resource value: 0x7F0801AD - public const int right_icon = 2131231149; + public const int right = 2131231149; // aapt resource value: 0x7F0801AE - public const int right_side = 2131231150; + public const int rightToLeft = 2131231150; // aapt resource value: 0x7F0801AF - public const int rounded = 2131231151; + public const int right_icon = 2131231151; // aapt resource value: 0x7F0801B0 - public const int row_index_key = 2131231152; + public const int right_side = 2131231152; // aapt resource value: 0x7F0801B1 - public const int satellite = 2131231153; + public const int rounded = 2131231153; // aapt resource value: 0x7F0801B2 - public const int save_non_transition_alpha = 2131231154; + public const int row_index_key = 2131231154; // aapt resource value: 0x7F0801B3 - public const int save_overlay_view = 2131231155; + public const int satellite = 2131231155; // aapt resource value: 0x7F0801B4 - public const int sawtooth = 2131231156; + public const int save_non_transition_alpha = 2131231156; // aapt resource value: 0x7F0801B5 - public const int scale = 2131231157; + public const int save_overlay_view = 2131231157; // aapt resource value: 0x7F0801B6 - public const int screen = 2131231158; + public const int sawtooth = 2131231158; // aapt resource value: 0x7F0801B7 - public const int scroll = 2131231159; - - // aapt resource value: 0x7F0801BB - public const int scrollable = 2131231163; + public const int scale = 2131231159; // aapt resource value: 0x7F0801B8 - public const int scrollIndicatorDown = 2131231160; + public const int screen = 2131231160; // aapt resource value: 0x7F0801B9 - public const int scrollIndicatorUp = 2131231161; - - // aapt resource value: 0x7F0801BA - public const int scrollView = 2131231162; - - // aapt resource value: 0x7F0801BC - public const int search_badge = 2131231164; + public const int scroll = 2131231161; // aapt resource value: 0x7F0801BD - public const int search_bar = 2131231165; + public const int scrollable = 2131231165; + + // aapt resource value: 0x7F0801BA + public const int scrollIndicatorDown = 2131231162; + + // aapt resource value: 0x7F0801BB + public const int scrollIndicatorUp = 2131231163; + + // aapt resource value: 0x7F0801BC + public const int scrollView = 2131231164; // aapt resource value: 0x7F0801BE - public const int search_button = 2131231166; + public const int search_badge = 2131231166; // aapt resource value: 0x7F0801BF - public const int search_close_btn = 2131231167; + public const int search_bar = 2131231167; // aapt resource value: 0x7F0801C0 - public const int search_edit_frame = 2131231168; + public const int search_button = 2131231168; // aapt resource value: 0x7F0801C1 - public const int search_go_btn = 2131231169; + public const int search_close_btn = 2131231169; // aapt resource value: 0x7F0801C2 - public const int search_mag_icon = 2131231170; + public const int search_edit_frame = 2131231170; // aapt resource value: 0x7F0801C3 - public const int search_plate = 2131231171; + public const int search_go_btn = 2131231171; // aapt resource value: 0x7F0801C4 - public const int search_src_text = 2131231172; + public const int search_mag_icon = 2131231172; // aapt resource value: 0x7F0801C5 - public const int search_voice_btn = 2131231173; + public const int search_plate = 2131231173; // aapt resource value: 0x7F0801C6 - public const int seekbar = 2131231174; + public const int search_src_text = 2131231174; // aapt resource value: 0x7F0801C7 - public const int seekbar_value = 2131231175; - - // aapt resource value: 0x7F0801C9 - public const int selected = 2131231177; - - // aapt resource value: 0x7F0801CA - public const int selection_type = 2131231178; + public const int search_voice_btn = 2131231175; // aapt resource value: 0x7F0801C8 - public const int select_dialog_listview = 2131231176; + public const int seekbar = 2131231176; + + // aapt resource value: 0x7F0801C9 + public const int seekbar_value = 2131231177; // aapt resource value: 0x7F0801CB - public const int sharedValueSet = 2131231179; + public const int selected = 2131231179; // aapt resource value: 0x7F0801CC - public const int sharedValueUnset = 2131231180; + public const int selection_type = 2131231180; + + // aapt resource value: 0x7F0801CA + public const int select_dialog_listview = 2131231178; // aapt resource value: 0x7F0801CD - public const int shellcontent_appbar = 2131231181; + public const int sharedValueSet = 2131231181; // aapt resource value: 0x7F0801CE - public const int shellcontent_toolbar = 2131231182; + public const int sharedValueUnset = 2131231182; + + // aapt resource value: 0x7F0801CF + public const int shellcontent_appbar = 2131231183; + + // aapt resource value: 0x7F0801D0 + public const int shellcontent_toolbar = 2131231184; // aapt resource value: 0x7F080007 public const int SHIFT = 2131230727; - // aapt resource value: 0x7F0801CF - public const int shortcut = 2131231183; - - // aapt resource value: 0x7F0801D0 - public const int showCustom = 2131231184; - // aapt resource value: 0x7F0801D1 - public const int showHome = 2131231185; + public const int shortcut = 2131231185; // aapt resource value: 0x7F0801D2 - public const int showTitle = 2131231186; + public const int showCustom = 2131231186; + + // aapt resource value: 0x7F0801D3 + public const int showHome = 2131231187; + + // aapt resource value: 0x7F0801D4 + public const int showTitle = 2131231188; // aapt resource value: 0x7F080008 public const int SHOW_ALL = 2131230728; @@ -25625,251 +25631,251 @@ namespace TINK.Droid // aapt resource value: 0x7F08000A public const int SHOW_PROGRESS = 2131230730; - // aapt resource value: 0x7F0801D3 - public const int sin = 2131231187; - - // aapt resource value: 0x7F0801D4 - public const int skipCollapsed = 2131231188; - // aapt resource value: 0x7F0801D5 - public const int skipped = 2131231189; + public const int sin = 2131231189; // aapt resource value: 0x7F0801D6 - public const int slide = 2131231190; + public const int skipCollapsed = 2131231190; // aapt resource value: 0x7F0801D7 - public const int sliding_tabs = 2131231191; + public const int skipped = 2131231191; // aapt resource value: 0x7F0801D8 - public const int snackbar_action = 2131231192; + public const int slide = 2131231192; // aapt resource value: 0x7F0801D9 - public const int snackbar_text = 2131231193; + public const int sliding_tabs = 2131231193; // aapt resource value: 0x7F0801DA - public const int snap = 2131231194; + public const int snackbar_action = 2131231194; // aapt resource value: 0x7F0801DB - public const int snapMargins = 2131231195; + public const int snackbar_text = 2131231195; // aapt resource value: 0x7F0801DC - public const int south = 2131231196; + public const int snap = 2131231196; // aapt resource value: 0x7F0801DD - public const int spacer = 2131231197; + public const int snapMargins = 2131231197; // aapt resource value: 0x7F0801DE - public const int special_effects_controller_view_tag = 2131231198; + public const int south = 2131231198; // aapt resource value: 0x7F0801DF - public const int spinner = 2131231199; + public const int spacer = 2131231199; // aapt resource value: 0x7F0801E0 - public const int spline = 2131231200; + public const int special_effects_controller_view_tag = 2131231200; // aapt resource value: 0x7F0801E1 - public const int split_action_bar = 2131231201; + public const int spinner = 2131231201; // aapt resource value: 0x7F0801E2 - public const int spread = 2131231202; + public const int spline = 2131231202; // aapt resource value: 0x7F0801E3 - public const int spread_inside = 2131231203; + public const int split_action_bar = 2131231203; // aapt resource value: 0x7F0801E4 - public const int spring = 2131231204; + public const int spread = 2131231204; // aapt resource value: 0x7F0801E5 - public const int square = 2131231205; + public const int spread_inside = 2131231205; // aapt resource value: 0x7F0801E6 - public const int src_atop = 2131231206; + public const int spring = 2131231206; // aapt resource value: 0x7F0801E7 - public const int src_in = 2131231207; + public const int square = 2131231207; // aapt resource value: 0x7F0801E8 - public const int src_over = 2131231208; + public const int src_atop = 2131231208; // aapt resource value: 0x7F0801E9 - public const int standard = 2131231209; + public const int src_in = 2131231209; // aapt resource value: 0x7F0801EA - public const int start = 2131231210; + public const int src_over = 2131231210; // aapt resource value: 0x7F0801EB - public const int startHorizontal = 2131231211; + public const int standard = 2131231211; // aapt resource value: 0x7F0801EC - public const int startToEnd = 2131231212; + public const int start = 2131231212; // aapt resource value: 0x7F0801ED - public const int startVertical = 2131231213; + public const int startHorizontal = 2131231213; // aapt resource value: 0x7F0801EE - public const int staticLayout = 2131231214; + public const int startToEnd = 2131231214; // aapt resource value: 0x7F0801EF - public const int staticPostLayout = 2131231215; + public const int startVertical = 2131231215; // aapt resource value: 0x7F0801F0 - public const int status_bar_latest_event_content = 2131231216; + public const int staticLayout = 2131231216; // aapt resource value: 0x7F0801F1 - public const int stop = 2131231217; + public const int staticPostLayout = 2131231217; // aapt resource value: 0x7F0801F2 - public const int stretch = 2131231218; + public const int status_bar_latest_event_content = 2131231218; // aapt resource value: 0x7F0801F3 - public const int submenuarrow = 2131231219; + public const int stop = 2131231219; // aapt resource value: 0x7F0801F4 - public const int submit_area = 2131231220; + public const int stretch = 2131231220; // aapt resource value: 0x7F0801F5 - public const int supportScrollUp = 2131231221; + public const int submenuarrow = 2131231221; // aapt resource value: 0x7F0801F6 - public const int switchWidget = 2131231222; + public const int submit_area = 2131231222; + + // aapt resource value: 0x7F0801F7 + public const int supportScrollUp = 2131231223; + + // aapt resource value: 0x7F0801F8 + public const int switchWidget = 2131231224; // aapt resource value: 0x7F08000B public const int SYM = 2131230731; - // aapt resource value: 0x7F0801F7 - public const int tabMode = 2131231223; - - // aapt resource value: 0x7F0801F8 - public const int tag_accessibility_actions = 2131231224; - // aapt resource value: 0x7F0801F9 - public const int tag_accessibility_clickable_spans = 2131231225; + public const int tabMode = 2131231225; // aapt resource value: 0x7F0801FA - public const int tag_accessibility_heading = 2131231226; + public const int tag_accessibility_actions = 2131231226; // aapt resource value: 0x7F0801FB - public const int tag_accessibility_pane_title = 2131231227; + public const int tag_accessibility_clickable_spans = 2131231227; // aapt resource value: 0x7F0801FC - public const int tag_on_apply_window_listener = 2131231228; + public const int tag_accessibility_heading = 2131231228; // aapt resource value: 0x7F0801FD - public const int tag_on_receive_content_listener = 2131231229; + public const int tag_accessibility_pane_title = 2131231229; // aapt resource value: 0x7F0801FE - public const int tag_on_receive_content_mime_types = 2131231230; + public const int tag_on_apply_window_listener = 2131231230; // aapt resource value: 0x7F0801FF - public const int tag_screen_reader_focusable = 2131231231; + public const int tag_on_receive_content_listener = 2131231231; // aapt resource value: 0x7F080200 - public const int tag_state_description = 2131231232; + public const int tag_on_receive_content_mime_types = 2131231232; // aapt resource value: 0x7F080201 - public const int tag_transition_group = 2131231233; + public const int tag_screen_reader_focusable = 2131231233; // aapt resource value: 0x7F080202 - public const int tag_unhandled_key_event_manager = 2131231234; + public const int tag_state_description = 2131231234; // aapt resource value: 0x7F080203 - public const int tag_unhandled_key_listeners = 2131231235; + public const int tag_transition_group = 2131231235; // aapt resource value: 0x7F080204 - public const int tag_window_insets_animation_callback = 2131231236; + public const int tag_unhandled_key_event_manager = 2131231236; // aapt resource value: 0x7F080205 - public const int terrain = 2131231237; + public const int tag_unhandled_key_listeners = 2131231237; // aapt resource value: 0x7F080206 - public const int test_checkbox_android_button_tint = 2131231238; + public const int tag_window_insets_animation_callback = 2131231238; // aapt resource value: 0x7F080207 - public const int test_checkbox_app_button_tint = 2131231239; + public const int terrain = 2131231239; // aapt resource value: 0x7F080208 - public const int test_radiobutton_android_button_tint = 2131231240; + public const int test_checkbox_android_button_tint = 2131231240; // aapt resource value: 0x7F080209 - public const int test_radiobutton_app_button_tint = 2131231241; + public const int test_checkbox_app_button_tint = 2131231241; // aapt resource value: 0x7F08020A - public const int text = 2131231242; + public const int test_radiobutton_android_button_tint = 2131231242; // aapt resource value: 0x7F08020B - public const int text1 = 2131231243; + public const int test_radiobutton_app_button_tint = 2131231243; // aapt resource value: 0x7F08020C - public const int text2 = 2131231244; + public const int text = 2131231244; // aapt resource value: 0x7F08020D - public const int textEnd = 2131231245; - - // aapt resource value: 0x7F080215 - public const int textinput_counter = 2131231253; - - // aapt resource value: 0x7F080216 - public const int textinput_error = 2131231254; - - // aapt resource value: 0x7F080217 - public const int textinput_helper_text = 2131231255; - - // aapt resource value: 0x7F080218 - public const int textinput_placeholder = 2131231256; - - // aapt resource value: 0x7F080219 - public const int textinput_prefix_text = 2131231257; - - // aapt resource value: 0x7F08021A - public const int textinput_suffix_text = 2131231258; + public const int text1 = 2131231245; // aapt resource value: 0x7F08020E - public const int textSpacerNoButtons = 2131231246; + public const int text2 = 2131231246; // aapt resource value: 0x7F08020F - public const int textSpacerNoTitle = 2131231247; + public const int textEnd = 2131231247; - // aapt resource value: 0x7F080210 - public const int textStart = 2131231248; + // aapt resource value: 0x7F080217 + public const int textinput_counter = 2131231255; - // aapt resource value: 0x7F080211 - public const int textTop = 2131231249; + // aapt resource value: 0x7F080218 + public const int textinput_error = 2131231256; - // aapt resource value: 0x7F080212 - public const int text_input_end_icon = 2131231250; + // aapt resource value: 0x7F080219 + public const int textinput_helper_text = 2131231257; - // aapt resource value: 0x7F080213 - public const int text_input_error_icon = 2131231251; - - // aapt resource value: 0x7F080214 - public const int text_input_start_icon = 2131231252; + // aapt resource value: 0x7F08021A + public const int textinput_placeholder = 2131231258; // aapt resource value: 0x7F08021B - public const int thing_proto = 2131231259; + public const int textinput_prefix_text = 2131231259; // aapt resource value: 0x7F08021C - public const int time = 2131231260; + public const int textinput_suffix_text = 2131231260; + + // aapt resource value: 0x7F080210 + public const int textSpacerNoButtons = 2131231248; + + // aapt resource value: 0x7F080211 + public const int textSpacerNoTitle = 2131231249; + + // aapt resource value: 0x7F080212 + public const int textStart = 2131231250; + + // aapt resource value: 0x7F080213 + public const int textTop = 2131231251; + + // aapt resource value: 0x7F080214 + public const int text_input_end_icon = 2131231252; + + // aapt resource value: 0x7F080215 + public const int text_input_error_icon = 2131231253; + + // aapt resource value: 0x7F080216 + public const int text_input_start_icon = 2131231254; // aapt resource value: 0x7F08021D - public const int title = 2131231261; + public const int thing_proto = 2131231261; // aapt resource value: 0x7F08021E - public const int titleDividerNoCustom = 2131231262; + public const int time = 2131231262; // aapt resource value: 0x7F08021F - public const int title_template = 2131231263; + public const int title = 2131231263; // aapt resource value: 0x7F080220 - public const int toggle = 2131231264; + public const int titleDividerNoCustom = 2131231264; // aapt resource value: 0x7F080221 - public const int toolbar = 2131231265; + public const int title_template = 2131231265; // aapt resource value: 0x7F080222 - public const int top = 2131231266; + public const int toggle = 2131231266; // aapt resource value: 0x7F080223 - public const int topPanel = 2131231267; + public const int toolbar = 2131231267; + + // aapt resource value: 0x7F080224 + public const int top = 2131231268; + + // aapt resource value: 0x7F080225 + public const int topPanel = 2131231269; // aapt resource value: 0x7F08000C public const int TOP_END = 2131230732; @@ -25877,113 +25883,113 @@ namespace TINK.Droid // aapt resource value: 0x7F08000D public const int TOP_START = 2131230733; - // aapt resource value: 0x7F080224 - public const int touch_outside = 2131231268; - - // aapt resource value: 0x7F080225 - public const int transitionToEnd = 2131231269; - // aapt resource value: 0x7F080226 - public const int transitionToStart = 2131231270; + public const int touch_outside = 2131231270; // aapt resource value: 0x7F080227 - public const int transition_current_scene = 2131231271; + public const int transitionToEnd = 2131231271; // aapt resource value: 0x7F080228 - public const int transition_layout_save = 2131231272; + public const int transitionToStart = 2131231272; // aapt resource value: 0x7F080229 - public const int transition_position = 2131231273; + public const int transition_current_scene = 2131231273; // aapt resource value: 0x7F08022A - public const int transition_scene_layoutid_cache = 2131231274; + public const int transition_layout_save = 2131231274; // aapt resource value: 0x7F08022B - public const int transition_transform = 2131231275; + public const int transition_position = 2131231275; // aapt resource value: 0x7F08022C - public const int triangle = 2131231276; + public const int transition_scene_layoutid_cache = 2131231276; // aapt resource value: 0x7F08022D - public const int @unchecked = 2131231277; + public const int transition_transform = 2131231277; // aapt resource value: 0x7F08022E - public const int uniform = 2131231278; + public const int triangle = 2131231278; // aapt resource value: 0x7F08022F - public const int unlabeled = 2131231279; + public const int @unchecked = 2131231279; // aapt resource value: 0x7F080230 - public const int up = 2131231280; + public const int uniform = 2131231280; // aapt resource value: 0x7F080231 - public const int url = 2131231281; + public const int unlabeled = 2131231281; // aapt resource value: 0x7F080232 - public const int useLogo = 2131231282; + public const int up = 2131231282; // aapt resource value: 0x7F080233 - public const int vertical_only = 2131231283; + public const int url = 2131231283; // aapt resource value: 0x7F080234 - public const int view_offset_helper = 2131231284; + public const int useLogo = 2131231284; // aapt resource value: 0x7F080235 - public const int view_transition = 2131231285; + public const int vertical_only = 2131231285; // aapt resource value: 0x7F080236 - public const int view_tree_lifecycle_owner = 2131231286; + public const int view_offset_helper = 2131231286; // aapt resource value: 0x7F080237 - public const int view_tree_on_back_pressed_dispatcher_owner = 2131231287; + public const int view_transition = 2131231287; // aapt resource value: 0x7F080238 - public const int view_tree_saved_state_registry_owner = 2131231288; + public const int view_tree_lifecycle_owner = 2131231288; // aapt resource value: 0x7F080239 - public const int view_tree_view_model_store_owner = 2131231289; + public const int view_tree_on_back_pressed_dispatcher_owner = 2131231289; // aapt resource value: 0x7F08023A - public const int visible = 2131231290; + public const int view_tree_saved_state_registry_owner = 2131231290; // aapt resource value: 0x7F08023B - public const int visible_removing_fragment_view_tag = 2131231291; + public const int view_tree_view_model_store_owner = 2131231291; // aapt resource value: 0x7F08023C - public const int volume_item_container = 2131231292; + public const int visible = 2131231292; // aapt resource value: 0x7F08023D - public const int webview = 2131231293; + public const int visible_removing_fragment_view_tag = 2131231293; // aapt resource value: 0x7F08023E - public const int west = 2131231294; + public const int volume_item_container = 2131231294; // aapt resource value: 0x7F08023F - public const int wide = 2131231295; - - // aapt resource value: 0x7F080241 - public const int withinBounds = 2131231297; + public const int webview = 2131231295; // aapt resource value: 0x7F080240 - public const int withText = 2131231296; + public const int west = 2131231296; - // aapt resource value: 0x7F080242 - public const int wrap = 2131231298; + // aapt resource value: 0x7F080241 + public const int wide = 2131231297; // aapt resource value: 0x7F080243 - public const int wrap_content = 2131231299; + public const int withinBounds = 2131231299; + + // aapt resource value: 0x7F080242 + public const int withText = 2131231298; // aapt resource value: 0x7F080244 - public const int wrap_content_constrained = 2131231300; + public const int wrap = 2131231300; // aapt resource value: 0x7F080245 - public const int x_left = 2131231301; + public const int wrap_content = 2131231301; // aapt resource value: 0x7F080246 - public const int x_right = 2131231302; + public const int wrap_content_constrained = 2131231302; // aapt resource value: 0x7F080247 - public const int zero_corner_chip = 2131231303; + public const int x_left = 2131231303; + + // aapt resource value: 0x7F080248 + public const int x_right = 2131231304; + + // aapt resource value: 0x7F080249 + public const int zero_corner_chip = 2131231305; static Id() { diff --git a/Meinkonrad/TINK.iOS/Info.plist b/Meinkonrad/TINK.iOS/Info.plist index 8f69fb4..c28e191 100644 --- a/Meinkonrad/TINK.iOS/Info.plist +++ b/Meinkonrad/TINK.iOS/Info.plist @@ -56,8 +56,8 @@ CFBundleDisplayName Mein konrad CFBundleVersion - 361 + 362 CFBundleShortVersionString - 3.0.361 + 3.0.362 diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/Contents.json b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/Contents.json index 89f3d0c..ea0f232 100644 --- a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/Contents.json +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "StationMarkerOpenBlue.svg", + "filename" : "StationMarkerOpenBlue.pdf", "idiom" : "universal" }, { diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/StationMarkerOpenBlue.pdf b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/StationMarkerOpenBlue.pdf new file mode 100644 index 0000000..6be809e --- /dev/null +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Blue.imageset/StationMarkerOpenBlue.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +4 0 obj +<< /Length 5 0 R + /Filter /FlateDecode +>> +stream +xmAn1E>(c8FPd,_*Ejǣ< aAj.~nEp-PIS[Ab8YJw`2zN Q&8>},nTzL IΌ:vZQ]w]2y,$=YԹ&Be%N6;nc:mȦLK^7%^+WZ.aqV +endstream +endobj +5 0 obj + 206 +endobj +3 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +2 0 obj +<< /Type /Page % 1 + /Parent 1 0 R + /MediaBox [ 0 0 29.393326 37.5 ] + /Contents 4 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 3 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 2 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Producer (cairo 1.17.4 (https://cairographics.org)) + /Creator + /CreationDate (D:20230323095234+01'00) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000617 00000 n +0000000392 00000 n +0000000320 00000 n +0000000015 00000 n +0000000298 00000 n +0000000682 00000 n +0000000965 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +1017 +%%EOF diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/Contents.json b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/Contents.json index f5cc7f7..e205691 100644 --- a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/Contents.json +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "StationMarkerOpenGreen.svg", + "filename" : "StationMarkerOpenGreen.pdf", "idiom" : "universal" }, { diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/StationMarkerOpenGreen.pdf b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/StationMarkerOpenGreen.pdf new file mode 100644 index 0000000..91cc363 Binary files /dev/null and b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Green.imageset/StationMarkerOpenGreen.pdf differ diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/Contents.json b/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/Contents.json index 93be63e..0e94925 100644 --- a/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/Contents.json +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "StationMarkerOpenLightBlue.svg", + "filename" : "StationMarkerOpenLightBlue.pdf", "idiom" : "universal" }, { diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/StationMarkerOpenLightBlue.pdf b/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/StationMarkerOpenLightBlue.pdf new file mode 100644 index 0000000..6be809e --- /dev/null +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_LightBlue.imageset/StationMarkerOpenLightBlue.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +4 0 obj +<< /Length 5 0 R + /Filter /FlateDecode +>> +stream +xmAn1E>(c8FPd,_*Ejǣ< aAj.~nEp-PIS[Ab8YJw`2zN Q&8>},nTzL IΌ:vZQ]w]2y,$=YԹ&Be%N6;nc:mȦLK^7%^+WZ.aqV +endstream +endobj +5 0 obj + 206 +endobj +3 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +2 0 obj +<< /Type /Page % 1 + /Parent 1 0 R + /MediaBox [ 0 0 29.393326 37.5 ] + /Contents 4 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 3 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 2 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Producer (cairo 1.17.4 (https://cairographics.org)) + /Creator + /CreationDate (D:20230323095234+01'00) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000617 00000 n +0000000392 00000 n +0000000320 00000 n +0000000015 00000 n +0000000298 00000 n +0000000682 00000 n +0000000965 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +1017 +%%EOF diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/Contents.json b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/Contents.json index 4c21ef0..87308be 100644 --- a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/Contents.json +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "StationMarkerOpenRed.svg", + "filename" : "StationMarkerOpenRed.pdf", "idiom" : "universal" }, { diff --git a/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/StationMarkerOpenRed.pdf b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/StationMarkerOpenRed.pdf new file mode 100644 index 0000000..6be809e --- /dev/null +++ b/Meinkonrad/TINK.iOS/Media.xcassets/Open_Red.imageset/StationMarkerOpenRed.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +4 0 obj +<< /Length 5 0 R + /Filter /FlateDecode +>> +stream +xmAn1E>(c8FPd,_*Ejǣ< aAj.~nEp-PIS[Ab8YJw`2zN Q&8>},nTzL IΌ:vZQ]w]2y,$=YԹ&Be%N6;nc:mȦLK^7%^+WZ.aqV +endstream +endobj +5 0 obj + 206 +endobj +3 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +2 0 obj +<< /Type /Page % 1 + /Parent 1 0 R + /MediaBox [ 0 0 29.393326 37.5 ] + /Contents 4 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 3 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 2 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Producer (cairo 1.17.4 (https://cairographics.org)) + /Creator + /CreationDate (D:20230323095234+01'00) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000617 00000 n +0000000392 00000 n +0000000320 00000 n +0000000015 00000 n +0000000298 00000 n +0000000682 00000 n +0000000965 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +1017 +%%EOF diff --git a/Meinkonrad/TINK.iOS/Meinkonrad.iOS.csproj b/Meinkonrad/TINK.iOS/Meinkonrad.iOS.csproj index 64e9652..32d8ab3 100644 --- a/Meinkonrad/TINK.iOS/Meinkonrad.iOS.csproj +++ b/Meinkonrad/TINK.iOS/Meinkonrad.iOS.csproj @@ -121,7 +121,7 @@ - + 1.6.3 @@ -130,7 +130,7 @@ 1.6.3 - + @@ -221,7 +221,7 @@ 0.7.124 - 5.0.0.2545 + 5.0.0.2578 @@ -294,25 +294,25 @@ false - + false false - + false false - + false false - + false diff --git a/Meinkonrad/TINK/App.xaml.cs b/Meinkonrad/TINK/App.xaml.cs index 70c107c..468ba96 100644 --- a/Meinkonrad/TINK/App.xaml.cs +++ b/Meinkonrad/TINK/App.xaml.cs @@ -336,9 +336,9 @@ namespace TINK /// /// Service container to manage geolocation services. /// - public static IServicesContainer LocationServicesContainer { get; } - = new ServicesContainerMutableT( - new HashSet { + public static IServicesContainer LocationServicesContainer { get; } + = new ServicesContainerMutableT( + new HashSet { new LastKnownGeolocationService(DependencyService.Get()), new SimulatedGeolocationService(DependencyService.Get()), new GeolocationAccuracyMediumService(DependencyService.Get()), diff --git a/Meinkonrad/TINK/View/Map/MapPage.xaml b/Meinkonrad/TINK/View/Map/MapPage.xaml index 57e02df..7fba29d 100644 --- a/Meinkonrad/TINK/View/Map/MapPage.xaml +++ b/Meinkonrad/TINK/View/Map/MapPage.xaml @@ -43,7 +43,6 @@ WidthRequest="320" HeightRequest="800" x:Name="MyMap" - MyLocationEnabled="True" MapType="Street"> diff --git a/Meinkonrad/TINK/View/Map/MapPage.xaml.cs b/Meinkonrad/TINK/View/Map/MapPage.xaml.cs index 5f1c4aa..1434ae2 100644 --- a/Meinkonrad/TINK/View/Map/MapPage.xaml.cs +++ b/Meinkonrad/TINK/View/Map/MapPage.xaml.cs @@ -31,9 +31,6 @@ namespace TINK.View.Map public MapPage() { InitializeComponent(); - - MyMap.UiSettings.MyLocationButtonEnabled = true; - } /// @@ -211,6 +208,24 @@ namespace TINK.View.Map isInitializationStarted = false; return; } + + try + { + Log.ForContext().Verbose("Setting map settings."); + + //show current user position (blue dot) and enable button for centering map manually. + MyMap.UiSettings.MyLocationButtonEnabled = MapPageViewModel.IsLocationPermissionGranted; + MyMap.IsShowingUser = MapPageViewModel.IsLocationPermissionGranted; + + //disable +/- buttons + MyMap.UiSettings.ZoomControlsEnabled = false; + } + catch (Exception exception) + { + Log.ForContext().Verbose("Setting map settings failed. {Exception}", exception); + isInitializationStarted = false; + return; + } } /// diff --git a/TINK/TINK.Android/Properties/AndroidManifest.xml b/TINK/TINK.Android/Properties/AndroidManifest.xml index 33f9f49..ca461f2 100644 --- a/TINK/TINK.Android/Properties/AndroidManifest.xml +++ b/TINK/TINK.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/TINK/TINK.Android/Resources/Resource.Designer.cs b/TINK/TINK.Android/Resources/Resource.Designer.cs index 7358aaf..f81e9ea 100644 --- a/TINK/TINK.Android/Resources/Resource.Designer.cs +++ b/TINK/TINK.Android/Resources/Resource.Designer.cs @@ -24921,670 +24921,676 @@ namespace TINK.Droid public const int inward = 2131230967; // aapt resource value: 0x7F0800F8 - public const int italic = 2131230968; + public const int is_pooling_container_tag = 2131230968; // aapt resource value: 0x7F0800F9 - public const int item_touch_helper_previous_elevation = 2131230969; + public const int italic = 2131230969; // aapt resource value: 0x7F0800FA - public const int jumpToEnd = 2131230970; + public const int item_touch_helper_previous_elevation = 2131230970; // aapt resource value: 0x7F0800FB - public const int jumpToStart = 2131230971; + public const int jumpToEnd = 2131230971; // aapt resource value: 0x7F0800FC - public const int labeled = 2131230972; + public const int jumpToStart = 2131230972; // aapt resource value: 0x7F0800FD - public const int large_icon_uri = 2131230973; + public const int labeled = 2131230973; // aapt resource value: 0x7F0800FE - public const int layout = 2131230974; + public const int large_icon_uri = 2131230974; // aapt resource value: 0x7F0800FF - public const int left = 2131230975; + public const int layout = 2131230975; // aapt resource value: 0x7F080100 - public const int leftToRight = 2131230976; + public const int left = 2131230976; // aapt resource value: 0x7F080101 - public const int legacy = 2131230977; + public const int leftToRight = 2131230977; // aapt resource value: 0x7F080102 - public const int light = 2131230978; + public const int legacy = 2131230978; // aapt resource value: 0x7F080103 - public const int line1 = 2131230979; + public const int light = 2131230979; // aapt resource value: 0x7F080104 - public const int line3 = 2131230980; + public const int line1 = 2131230980; // aapt resource value: 0x7F080105 - public const int linear = 2131230981; + public const int line3 = 2131230981; // aapt resource value: 0x7F080106 - public const int listMode = 2131230982; + public const int linear = 2131230982; // aapt resource value: 0x7F080107 - public const int list_item = 2131230983; + public const int listMode = 2131230983; // aapt resource value: 0x7F080108 - public const int main_appbar = 2131230984; + public const int list_item = 2131230984; // aapt resource value: 0x7F080109 - public const int main_tablayout = 2131230985; + public const int main_appbar = 2131230985; // aapt resource value: 0x7F08010A - public const int main_toolbar = 2131230986; + public const int main_tablayout = 2131230986; // aapt resource value: 0x7F08010B - public const int main_viewpager = 2131230987; + public const int main_toolbar = 2131230987; // aapt resource value: 0x7F08010C - public const int masked = 2131230988; + public const int main_viewpager = 2131230988; // aapt resource value: 0x7F08010D - public const int match_constraint = 2131230989; + public const int masked = 2131230989; // aapt resource value: 0x7F08010E - public const int match_global_nicknames = 2131230990; + public const int match_constraint = 2131230990; // aapt resource value: 0x7F08010F - public const int match_parent = 2131230991; + public const int match_global_nicknames = 2131230991; // aapt resource value: 0x7F080110 - public const int material_clock_display = 2131230992; + public const int match_parent = 2131230992; // aapt resource value: 0x7F080111 - public const int material_clock_face = 2131230993; + public const int material_clock_display = 2131230993; // aapt resource value: 0x7F080112 - public const int material_clock_hand = 2131230994; + public const int material_clock_face = 2131230994; // aapt resource value: 0x7F080113 - public const int material_clock_period_am_button = 2131230995; + public const int material_clock_hand = 2131230995; // aapt resource value: 0x7F080114 - public const int material_clock_period_pm_button = 2131230996; + public const int material_clock_period_am_button = 2131230996; // aapt resource value: 0x7F080115 - public const int material_clock_period_toggle = 2131230997; + public const int material_clock_period_pm_button = 2131230997; // aapt resource value: 0x7F080116 - public const int material_hour_text_input = 2131230998; + public const int material_clock_period_toggle = 2131230998; // aapt resource value: 0x7F080117 - public const int material_hour_tv = 2131230999; + public const int material_hour_text_input = 2131230999; // aapt resource value: 0x7F080118 - public const int material_label = 2131231000; + public const int material_hour_tv = 2131231000; // aapt resource value: 0x7F080119 - public const int material_minute_text_input = 2131231001; + public const int material_label = 2131231001; // aapt resource value: 0x7F08011A - public const int material_minute_tv = 2131231002; + public const int material_minute_text_input = 2131231002; // aapt resource value: 0x7F08011B - public const int material_textinput_timepicker = 2131231003; + public const int material_minute_tv = 2131231003; // aapt resource value: 0x7F08011C - public const int material_timepicker_cancel_button = 2131231004; + public const int material_textinput_timepicker = 2131231004; // aapt resource value: 0x7F08011D - public const int material_timepicker_container = 2131231005; + public const int material_timepicker_cancel_button = 2131231005; // aapt resource value: 0x7F08011E - public const int material_timepicker_edit_text = 2131231006; + public const int material_timepicker_container = 2131231006; // aapt resource value: 0x7F08011F - public const int material_timepicker_mode_button = 2131231007; + public const int material_timepicker_edit_text = 2131231007; // aapt resource value: 0x7F080120 - public const int material_timepicker_ok_button = 2131231008; + public const int material_timepicker_mode_button = 2131231008; // aapt resource value: 0x7F080121 - public const int material_timepicker_view = 2131231009; + public const int material_timepicker_ok_button = 2131231009; // aapt resource value: 0x7F080122 - public const int material_value_index = 2131231010; + public const int material_timepicker_view = 2131231010; // aapt resource value: 0x7F080123 - public const int media_actions = 2131231011; + public const int material_value_index = 2131231011; // aapt resource value: 0x7F080124 - public const int media_controller_compat_view_tag = 2131231012; + public const int media_actions = 2131231012; // aapt resource value: 0x7F080125 - public const int message = 2131231013; + public const int media_controller_compat_view_tag = 2131231013; + + // aapt resource value: 0x7F080126 + public const int message = 2131231014; // aapt resource value: 0x7F080005 public const int META = 2131230725; - // aapt resource value: 0x7F080126 - public const int middle = 2131231014; - // aapt resource value: 0x7F080127 - public const int mini = 2131231015; + public const int middle = 2131231015; // aapt resource value: 0x7F080128 - public const int month_grid = 2131231016; + public const int mini = 2131231016; // aapt resource value: 0x7F080129 - public const int month_navigation_bar = 2131231017; + public const int month_grid = 2131231017; // aapt resource value: 0x7F08012A - public const int month_navigation_fragment_toggle = 2131231018; + public const int month_navigation_bar = 2131231018; // aapt resource value: 0x7F08012B - public const int month_navigation_next = 2131231019; + public const int month_navigation_fragment_toggle = 2131231019; // aapt resource value: 0x7F08012C - public const int month_navigation_previous = 2131231020; + public const int month_navigation_next = 2131231020; // aapt resource value: 0x7F08012D - public const int month_title = 2131231021; + public const int month_navigation_previous = 2131231021; // aapt resource value: 0x7F08012E - public const int motion_base = 2131231022; + public const int month_title = 2131231022; // aapt resource value: 0x7F08012F - public const int mr_art = 2131231023; + public const int motion_base = 2131231023; // aapt resource value: 0x7F080130 - public const int mr_cast_checkbox = 2131231024; + public const int mr_art = 2131231024; // aapt resource value: 0x7F080131 - public const int mr_cast_close_button = 2131231025; + public const int mr_cast_checkbox = 2131231025; // aapt resource value: 0x7F080132 - public const int mr_cast_divider = 2131231026; + public const int mr_cast_close_button = 2131231026; // aapt resource value: 0x7F080133 - public const int mr_cast_group_icon = 2131231027; + public const int mr_cast_divider = 2131231027; // aapt resource value: 0x7F080134 - public const int mr_cast_group_name = 2131231028; + public const int mr_cast_group_icon = 2131231028; // aapt resource value: 0x7F080135 - public const int mr_cast_group_progress_bar = 2131231029; + public const int mr_cast_group_name = 2131231029; // aapt resource value: 0x7F080136 - public const int mr_cast_header_name = 2131231030; + public const int mr_cast_group_progress_bar = 2131231030; // aapt resource value: 0x7F080137 - public const int mr_cast_list = 2131231031; + public const int mr_cast_header_name = 2131231031; // aapt resource value: 0x7F080138 - public const int mr_cast_meta_art = 2131231032; + public const int mr_cast_list = 2131231032; // aapt resource value: 0x7F080139 - public const int mr_cast_meta_background = 2131231033; + public const int mr_cast_meta_art = 2131231033; // aapt resource value: 0x7F08013A - public const int mr_cast_meta_black_scrim = 2131231034; + public const int mr_cast_meta_background = 2131231034; // aapt resource value: 0x7F08013B - public const int mr_cast_meta_subtitle = 2131231035; + public const int mr_cast_meta_black_scrim = 2131231035; // aapt resource value: 0x7F08013C - public const int mr_cast_meta_title = 2131231036; + public const int mr_cast_meta_subtitle = 2131231036; // aapt resource value: 0x7F08013D - public const int mr_cast_mute_button = 2131231037; + public const int mr_cast_meta_title = 2131231037; // aapt resource value: 0x7F08013E - public const int mr_cast_route_icon = 2131231038; + public const int mr_cast_mute_button = 2131231038; // aapt resource value: 0x7F08013F - public const int mr_cast_route_name = 2131231039; + public const int mr_cast_route_icon = 2131231039; // aapt resource value: 0x7F080140 - public const int mr_cast_route_progress_bar = 2131231040; + public const int mr_cast_route_name = 2131231040; // aapt resource value: 0x7F080141 - public const int mr_cast_stop_button = 2131231041; + public const int mr_cast_route_progress_bar = 2131231041; // aapt resource value: 0x7F080142 - public const int mr_cast_volume_layout = 2131231042; + public const int mr_cast_stop_button = 2131231042; // aapt resource value: 0x7F080143 - public const int mr_cast_volume_slider = 2131231043; + public const int mr_cast_volume_layout = 2131231043; // aapt resource value: 0x7F080144 - public const int mr_chooser_list = 2131231044; + public const int mr_cast_volume_slider = 2131231044; // aapt resource value: 0x7F080145 - public const int mr_chooser_route_desc = 2131231045; + public const int mr_chooser_list = 2131231045; // aapt resource value: 0x7F080146 - public const int mr_chooser_route_icon = 2131231046; + public const int mr_chooser_route_desc = 2131231046; // aapt resource value: 0x7F080147 - public const int mr_chooser_route_name = 2131231047; + public const int mr_chooser_route_icon = 2131231047; // aapt resource value: 0x7F080148 - public const int mr_chooser_route_progress_bar = 2131231048; + public const int mr_chooser_route_name = 2131231048; // aapt resource value: 0x7F080149 - public const int mr_chooser_title = 2131231049; + public const int mr_chooser_route_progress_bar = 2131231049; // aapt resource value: 0x7F08014A - public const int mr_close = 2131231050; + public const int mr_chooser_title = 2131231050; // aapt resource value: 0x7F08014B - public const int mr_control_divider = 2131231051; + public const int mr_close = 2131231051; // aapt resource value: 0x7F08014C - public const int mr_control_playback_ctrl = 2131231052; + public const int mr_control_divider = 2131231052; // aapt resource value: 0x7F08014D - public const int mr_control_subtitle = 2131231053; + public const int mr_control_playback_ctrl = 2131231053; // aapt resource value: 0x7F08014E - public const int mr_control_title = 2131231054; + public const int mr_control_subtitle = 2131231054; // aapt resource value: 0x7F08014F - public const int mr_control_title_container = 2131231055; + public const int mr_control_title = 2131231055; // aapt resource value: 0x7F080150 - public const int mr_custom_control = 2131231056; + public const int mr_control_title_container = 2131231056; // aapt resource value: 0x7F080151 - public const int mr_default_control = 2131231057; + public const int mr_custom_control = 2131231057; // aapt resource value: 0x7F080152 - public const int mr_dialog_area = 2131231058; + public const int mr_default_control = 2131231058; // aapt resource value: 0x7F080153 - public const int mr_expandable_area = 2131231059; + public const int mr_dialog_area = 2131231059; // aapt resource value: 0x7F080154 - public const int mr_group_expand_collapse = 2131231060; + public const int mr_expandable_area = 2131231060; // aapt resource value: 0x7F080155 - public const int mr_group_volume_route_name = 2131231061; + public const int mr_group_expand_collapse = 2131231061; // aapt resource value: 0x7F080156 - public const int mr_media_main_control = 2131231062; + public const int mr_group_volume_route_name = 2131231062; // aapt resource value: 0x7F080157 - public const int mr_name = 2131231063; + public const int mr_media_main_control = 2131231063; // aapt resource value: 0x7F080158 - public const int mr_picker_close_button = 2131231064; + public const int mr_name = 2131231064; // aapt resource value: 0x7F080159 - public const int mr_picker_header_name = 2131231065; + public const int mr_picker_close_button = 2131231065; // aapt resource value: 0x7F08015A - public const int mr_picker_list = 2131231066; + public const int mr_picker_header_name = 2131231066; // aapt resource value: 0x7F08015B - public const int mr_picker_route_icon = 2131231067; + public const int mr_picker_list = 2131231067; // aapt resource value: 0x7F08015C - public const int mr_picker_route_name = 2131231068; + public const int mr_picker_route_icon = 2131231068; // aapt resource value: 0x7F08015D - public const int mr_picker_route_progress_bar = 2131231069; + public const int mr_picker_route_name = 2131231069; // aapt resource value: 0x7F08015E - public const int mr_playback_control = 2131231070; + public const int mr_picker_route_progress_bar = 2131231070; // aapt resource value: 0x7F08015F - public const int mr_title_bar = 2131231071; + public const int mr_playback_control = 2131231071; // aapt resource value: 0x7F080160 - public const int mr_volume_control = 2131231072; + public const int mr_title_bar = 2131231072; // aapt resource value: 0x7F080161 - public const int mr_volume_group_list = 2131231073; + public const int mr_volume_control = 2131231073; // aapt resource value: 0x7F080162 - public const int mr_volume_item_icon = 2131231074; + public const int mr_volume_group_list = 2131231074; // aapt resource value: 0x7F080163 - public const int mr_volume_slider = 2131231075; + public const int mr_volume_item_icon = 2131231075; // aapt resource value: 0x7F080164 - public const int mtrl_anchor_parent = 2131231076; - - // aapt resource value: 0x7F080166 - public const int mtrl_calendar_days_of_week = 2131231078; + public const int mr_volume_slider = 2131231076; // aapt resource value: 0x7F080165 - public const int mtrl_calendar_day_selector_frame = 2131231077; + public const int mtrl_anchor_parent = 2131231077; // aapt resource value: 0x7F080167 - public const int mtrl_calendar_frame = 2131231079; + public const int mtrl_calendar_days_of_week = 2131231079; + + // aapt resource value: 0x7F080166 + public const int mtrl_calendar_day_selector_frame = 2131231078; // aapt resource value: 0x7F080168 - public const int mtrl_calendar_main_pane = 2131231080; + public const int mtrl_calendar_frame = 2131231080; // aapt resource value: 0x7F080169 - public const int mtrl_calendar_months = 2131231081; + public const int mtrl_calendar_main_pane = 2131231081; // aapt resource value: 0x7F08016A - public const int mtrl_calendar_selection_frame = 2131231082; + public const int mtrl_calendar_months = 2131231082; // aapt resource value: 0x7F08016B - public const int mtrl_calendar_text_input_frame = 2131231083; + public const int mtrl_calendar_selection_frame = 2131231083; // aapt resource value: 0x7F08016C - public const int mtrl_calendar_year_selector_frame = 2131231084; + public const int mtrl_calendar_text_input_frame = 2131231084; // aapt resource value: 0x7F08016D - public const int mtrl_card_checked_layer_id = 2131231085; + public const int mtrl_calendar_year_selector_frame = 2131231085; // aapt resource value: 0x7F08016E - public const int mtrl_child_content_container = 2131231086; + public const int mtrl_card_checked_layer_id = 2131231086; // aapt resource value: 0x7F08016F - public const int mtrl_internal_children_alpha_tag = 2131231087; + public const int mtrl_child_content_container = 2131231087; // aapt resource value: 0x7F080170 - public const int mtrl_motion_snapshot_view = 2131231088; + public const int mtrl_internal_children_alpha_tag = 2131231088; // aapt resource value: 0x7F080171 - public const int mtrl_picker_fullscreen = 2131231089; + public const int mtrl_motion_snapshot_view = 2131231089; // aapt resource value: 0x7F080172 - public const int mtrl_picker_header = 2131231090; + public const int mtrl_picker_fullscreen = 2131231090; // aapt resource value: 0x7F080173 - public const int mtrl_picker_header_selection_text = 2131231091; + public const int mtrl_picker_header = 2131231091; // aapt resource value: 0x7F080174 - public const int mtrl_picker_header_title_and_selection = 2131231092; + public const int mtrl_picker_header_selection_text = 2131231092; // aapt resource value: 0x7F080175 - public const int mtrl_picker_header_toggle = 2131231093; + public const int mtrl_picker_header_title_and_selection = 2131231093; // aapt resource value: 0x7F080176 - public const int mtrl_picker_text_input_date = 2131231094; + public const int mtrl_picker_header_toggle = 2131231094; // aapt resource value: 0x7F080177 - public const int mtrl_picker_text_input_range_end = 2131231095; + public const int mtrl_picker_text_input_date = 2131231095; // aapt resource value: 0x7F080178 - public const int mtrl_picker_text_input_range_start = 2131231096; + public const int mtrl_picker_text_input_range_end = 2131231096; // aapt resource value: 0x7F080179 - public const int mtrl_picker_title_text = 2131231097; + public const int mtrl_picker_text_input_range_start = 2131231097; // aapt resource value: 0x7F08017A - public const int mtrl_view_tag_bottom_padding = 2131231098; + public const int mtrl_picker_title_text = 2131231098; // aapt resource value: 0x7F08017B - public const int multiply = 2131231099; - - // aapt resource value: 0x7F08017D - public const int navigation_bar_item_icon_view = 2131231101; - - // aapt resource value: 0x7F08017E - public const int navigation_bar_item_labels_group = 2131231102; - - // aapt resource value: 0x7F08017F - public const int navigation_bar_item_large_label_view = 2131231103; - - // aapt resource value: 0x7F080180 - public const int navigation_bar_item_small_label_view = 2131231104; - - // aapt resource value: 0x7F080181 - public const int navigation_header_container = 2131231105; + public const int mtrl_view_tag_bottom_padding = 2131231099; // aapt resource value: 0x7F08017C - public const int nav_controller_view_tag = 2131231100; + public const int multiply = 2131231100; + + // aapt resource value: 0x7F08017E + public const int navigation_bar_item_icon_view = 2131231102; + + // aapt resource value: 0x7F08017F + public const int navigation_bar_item_labels_group = 2131231103; + + // aapt resource value: 0x7F080180 + public const int navigation_bar_item_large_label_view = 2131231104; + + // aapt resource value: 0x7F080181 + public const int navigation_bar_item_small_label_view = 2131231105; // aapt resource value: 0x7F080182 - public const int never = 2131231106; + public const int navigation_header_container = 2131231106; + + // aapt resource value: 0x7F08017D + public const int nav_controller_view_tag = 2131231101; // aapt resource value: 0x7F080183 - public const int neverCompleteToEnd = 2131231107; + public const int never = 2131231107; // aapt resource value: 0x7F080184 - public const int neverCompleteToStart = 2131231108; - - // aapt resource value: 0x7F080187 - public const int none = 2131231111; - - // aapt resource value: 0x7F080188 - public const int normal = 2131231112; - - // aapt resource value: 0x7F080189 - public const int north = 2131231113; + public const int neverCompleteToEnd = 2131231108; // aapt resource value: 0x7F080185 - public const int noScroll = 2131231109; + public const int neverCompleteToStart = 2131231109; - // aapt resource value: 0x7F080186 - public const int noState = 2131231110; + // aapt resource value: 0x7F080188 + public const int none = 2131231112; + + // aapt resource value: 0x7F080189 + public const int normal = 2131231113; // aapt resource value: 0x7F08018A - public const int notification_background = 2131231114; + public const int north = 2131231114; + + // aapt resource value: 0x7F080186 + public const int noScroll = 2131231110; + + // aapt resource value: 0x7F080187 + public const int noState = 2131231111; // aapt resource value: 0x7F08018B - public const int notification_main_column = 2131231115; + public const int notification_background = 2131231115; // aapt resource value: 0x7F08018C - public const int notification_main_column_container = 2131231116; + public const int notification_main_column = 2131231116; + + // aapt resource value: 0x7F08018D + public const int notification_main_column_container = 2131231117; // aapt resource value: 0x7F080006 public const int NO_DEBUG = 2131230726; - // aapt resource value: 0x7F08018D - public const int off = 2131231117; - // aapt resource value: 0x7F08018E - public const int omnibox_title_section = 2131231118; + public const int off = 2131231118; // aapt resource value: 0x7F08018F - public const int omnibox_url_section = 2131231119; + public const int omnibox_title_section = 2131231119; // aapt resource value: 0x7F080190 - public const int on = 2131231120; + public const int omnibox_url_section = 2131231120; // aapt resource value: 0x7F080191 - public const int outline = 2131231121; + public const int on = 2131231121; // aapt resource value: 0x7F080192 - public const int outward = 2131231122; + public const int outline = 2131231122; // aapt resource value: 0x7F080193 - public const int overshoot = 2131231123; + public const int outward = 2131231123; // aapt resource value: 0x7F080194 - public const int packed = 2131231124; + public const int overshoot = 2131231124; // aapt resource value: 0x7F080195 - public const int parallax = 2131231125; + public const int packed = 2131231125; // aapt resource value: 0x7F080196 - public const int parent = 2131231126; + public const int parallax = 2131231126; // aapt resource value: 0x7F080197 - public const int parentPanel = 2131231127; + public const int parent = 2131231127; // aapt resource value: 0x7F080198 - public const int parentRelative = 2131231128; + public const int parentPanel = 2131231128; // aapt resource value: 0x7F080199 - public const int parent_matrix = 2131231129; + public const int parentRelative = 2131231129; // aapt resource value: 0x7F08019A - public const int password_toggle = 2131231130; + public const int parent_matrix = 2131231130; // aapt resource value: 0x7F08019B - public const int path = 2131231131; + public const int password_toggle = 2131231131; // aapt resource value: 0x7F08019C - public const int pathRelative = 2131231132; + public const int path = 2131231132; // aapt resource value: 0x7F08019D - public const int peekHeight = 2131231133; + public const int pathRelative = 2131231133; // aapt resource value: 0x7F08019E - public const int percent = 2131231134; + public const int peekHeight = 2131231134; // aapt resource value: 0x7F08019F - public const int pin = 2131231135; + public const int percent = 2131231135; // aapt resource value: 0x7F0801A0 - public const int plain = 2131231136; + public const int pin = 2131231136; // aapt resource value: 0x7F0801A1 - public const int position = 2131231137; + public const int plain = 2131231137; // aapt resource value: 0x7F0801A2 - public const int postLayout = 2131231138; + public const int pooling_container_listener_holder_tag = 2131231138; // aapt resource value: 0x7F0801A3 - public const int progress_circular = 2131231139; + public const int position = 2131231139; // aapt resource value: 0x7F0801A4 - public const int progress_horizontal = 2131231140; + public const int postLayout = 2131231140; // aapt resource value: 0x7F0801A5 - public const int radio = 2131231141; + public const int progress_circular = 2131231141; // aapt resource value: 0x7F0801A6 - public const int ratio = 2131231142; + public const int progress_horizontal = 2131231142; // aapt resource value: 0x7F0801A7 - public const int rectangles = 2131231143; + public const int radio = 2131231143; // aapt resource value: 0x7F0801A8 - public const int recycler_view = 2131231144; + public const int ratio = 2131231144; // aapt resource value: 0x7F0801A9 - public const int reverseSawtooth = 2131231145; + public const int rectangles = 2131231145; // aapt resource value: 0x7F0801AA - public const int rfc822 = 2131231146; + public const int recycler_view = 2131231146; // aapt resource value: 0x7F0801AB - public const int right = 2131231147; + public const int reverseSawtooth = 2131231147; // aapt resource value: 0x7F0801AC - public const int rightToLeft = 2131231148; + public const int rfc822 = 2131231148; // aapt resource value: 0x7F0801AD - public const int right_icon = 2131231149; + public const int right = 2131231149; // aapt resource value: 0x7F0801AE - public const int right_side = 2131231150; + public const int rightToLeft = 2131231150; // aapt resource value: 0x7F0801AF - public const int rounded = 2131231151; + public const int right_icon = 2131231151; // aapt resource value: 0x7F0801B0 - public const int row_index_key = 2131231152; + public const int right_side = 2131231152; // aapt resource value: 0x7F0801B1 - public const int satellite = 2131231153; + public const int rounded = 2131231153; // aapt resource value: 0x7F0801B2 - public const int save_non_transition_alpha = 2131231154; + public const int row_index_key = 2131231154; // aapt resource value: 0x7F0801B3 - public const int save_overlay_view = 2131231155; + public const int satellite = 2131231155; // aapt resource value: 0x7F0801B4 - public const int sawtooth = 2131231156; + public const int save_non_transition_alpha = 2131231156; // aapt resource value: 0x7F0801B5 - public const int scale = 2131231157; + public const int save_overlay_view = 2131231157; // aapt resource value: 0x7F0801B6 - public const int screen = 2131231158; + public const int sawtooth = 2131231158; // aapt resource value: 0x7F0801B7 - public const int scroll = 2131231159; - - // aapt resource value: 0x7F0801BB - public const int scrollable = 2131231163; + public const int scale = 2131231159; // aapt resource value: 0x7F0801B8 - public const int scrollIndicatorDown = 2131231160; + public const int screen = 2131231160; // aapt resource value: 0x7F0801B9 - public const int scrollIndicatorUp = 2131231161; - - // aapt resource value: 0x7F0801BA - public const int scrollView = 2131231162; - - // aapt resource value: 0x7F0801BC - public const int search_badge = 2131231164; + public const int scroll = 2131231161; // aapt resource value: 0x7F0801BD - public const int search_bar = 2131231165; + public const int scrollable = 2131231165; + + // aapt resource value: 0x7F0801BA + public const int scrollIndicatorDown = 2131231162; + + // aapt resource value: 0x7F0801BB + public const int scrollIndicatorUp = 2131231163; + + // aapt resource value: 0x7F0801BC + public const int scrollView = 2131231164; // aapt resource value: 0x7F0801BE - public const int search_button = 2131231166; + public const int search_badge = 2131231166; // aapt resource value: 0x7F0801BF - public const int search_close_btn = 2131231167; + public const int search_bar = 2131231167; // aapt resource value: 0x7F0801C0 - public const int search_edit_frame = 2131231168; + public const int search_button = 2131231168; // aapt resource value: 0x7F0801C1 - public const int search_go_btn = 2131231169; + public const int search_close_btn = 2131231169; // aapt resource value: 0x7F0801C2 - public const int search_mag_icon = 2131231170; + public const int search_edit_frame = 2131231170; // aapt resource value: 0x7F0801C3 - public const int search_plate = 2131231171; + public const int search_go_btn = 2131231171; // aapt resource value: 0x7F0801C4 - public const int search_src_text = 2131231172; + public const int search_mag_icon = 2131231172; // aapt resource value: 0x7F0801C5 - public const int search_voice_btn = 2131231173; + public const int search_plate = 2131231173; // aapt resource value: 0x7F0801C6 - public const int seekbar = 2131231174; + public const int search_src_text = 2131231174; // aapt resource value: 0x7F0801C7 - public const int seekbar_value = 2131231175; - - // aapt resource value: 0x7F0801C9 - public const int selected = 2131231177; - - // aapt resource value: 0x7F0801CA - public const int selection_type = 2131231178; + public const int search_voice_btn = 2131231175; // aapt resource value: 0x7F0801C8 - public const int select_dialog_listview = 2131231176; + public const int seekbar = 2131231176; + + // aapt resource value: 0x7F0801C9 + public const int seekbar_value = 2131231177; // aapt resource value: 0x7F0801CB - public const int sharedValueSet = 2131231179; + public const int selected = 2131231179; // aapt resource value: 0x7F0801CC - public const int sharedValueUnset = 2131231180; + public const int selection_type = 2131231180; + + // aapt resource value: 0x7F0801CA + public const int select_dialog_listview = 2131231178; // aapt resource value: 0x7F0801CD - public const int shellcontent_appbar = 2131231181; + public const int sharedValueSet = 2131231181; // aapt resource value: 0x7F0801CE - public const int shellcontent_toolbar = 2131231182; + public const int sharedValueUnset = 2131231182; + + // aapt resource value: 0x7F0801CF + public const int shellcontent_appbar = 2131231183; + + // aapt resource value: 0x7F0801D0 + public const int shellcontent_toolbar = 2131231184; // aapt resource value: 0x7F080007 public const int SHIFT = 2131230727; - // aapt resource value: 0x7F0801CF - public const int shortcut = 2131231183; - - // aapt resource value: 0x7F0801D0 - public const int showCustom = 2131231184; - // aapt resource value: 0x7F0801D1 - public const int showHome = 2131231185; + public const int shortcut = 2131231185; // aapt resource value: 0x7F0801D2 - public const int showTitle = 2131231186; + public const int showCustom = 2131231186; + + // aapt resource value: 0x7F0801D3 + public const int showHome = 2131231187; + + // aapt resource value: 0x7F0801D4 + public const int showTitle = 2131231188; // aapt resource value: 0x7F080008 public const int SHOW_ALL = 2131230728; @@ -25595,251 +25601,251 @@ namespace TINK.Droid // aapt resource value: 0x7F08000A public const int SHOW_PROGRESS = 2131230730; - // aapt resource value: 0x7F0801D3 - public const int sin = 2131231187; - - // aapt resource value: 0x7F0801D4 - public const int skipCollapsed = 2131231188; - // aapt resource value: 0x7F0801D5 - public const int skipped = 2131231189; + public const int sin = 2131231189; // aapt resource value: 0x7F0801D6 - public const int slide = 2131231190; + public const int skipCollapsed = 2131231190; // aapt resource value: 0x7F0801D7 - public const int sliding_tabs = 2131231191; + public const int skipped = 2131231191; // aapt resource value: 0x7F0801D8 - public const int snackbar_action = 2131231192; + public const int slide = 2131231192; // aapt resource value: 0x7F0801D9 - public const int snackbar_text = 2131231193; + public const int sliding_tabs = 2131231193; // aapt resource value: 0x7F0801DA - public const int snap = 2131231194; + public const int snackbar_action = 2131231194; // aapt resource value: 0x7F0801DB - public const int snapMargins = 2131231195; + public const int snackbar_text = 2131231195; // aapt resource value: 0x7F0801DC - public const int south = 2131231196; + public const int snap = 2131231196; // aapt resource value: 0x7F0801DD - public const int spacer = 2131231197; + public const int snapMargins = 2131231197; // aapt resource value: 0x7F0801DE - public const int special_effects_controller_view_tag = 2131231198; + public const int south = 2131231198; // aapt resource value: 0x7F0801DF - public const int spinner = 2131231199; + public const int spacer = 2131231199; // aapt resource value: 0x7F0801E0 - public const int spline = 2131231200; + public const int special_effects_controller_view_tag = 2131231200; // aapt resource value: 0x7F0801E1 - public const int split_action_bar = 2131231201; + public const int spinner = 2131231201; // aapt resource value: 0x7F0801E2 - public const int spread = 2131231202; + public const int spline = 2131231202; // aapt resource value: 0x7F0801E3 - public const int spread_inside = 2131231203; + public const int split_action_bar = 2131231203; // aapt resource value: 0x7F0801E4 - public const int spring = 2131231204; + public const int spread = 2131231204; // aapt resource value: 0x7F0801E5 - public const int square = 2131231205; + public const int spread_inside = 2131231205; // aapt resource value: 0x7F0801E6 - public const int src_atop = 2131231206; + public const int spring = 2131231206; // aapt resource value: 0x7F0801E7 - public const int src_in = 2131231207; + public const int square = 2131231207; // aapt resource value: 0x7F0801E8 - public const int src_over = 2131231208; + public const int src_atop = 2131231208; // aapt resource value: 0x7F0801E9 - public const int standard = 2131231209; + public const int src_in = 2131231209; // aapt resource value: 0x7F0801EA - public const int start = 2131231210; + public const int src_over = 2131231210; // aapt resource value: 0x7F0801EB - public const int startHorizontal = 2131231211; + public const int standard = 2131231211; // aapt resource value: 0x7F0801EC - public const int startToEnd = 2131231212; + public const int start = 2131231212; // aapt resource value: 0x7F0801ED - public const int startVertical = 2131231213; + public const int startHorizontal = 2131231213; // aapt resource value: 0x7F0801EE - public const int staticLayout = 2131231214; + public const int startToEnd = 2131231214; // aapt resource value: 0x7F0801EF - public const int staticPostLayout = 2131231215; + public const int startVertical = 2131231215; // aapt resource value: 0x7F0801F0 - public const int status_bar_latest_event_content = 2131231216; + public const int staticLayout = 2131231216; // aapt resource value: 0x7F0801F1 - public const int stop = 2131231217; + public const int staticPostLayout = 2131231217; // aapt resource value: 0x7F0801F2 - public const int stretch = 2131231218; + public const int status_bar_latest_event_content = 2131231218; // aapt resource value: 0x7F0801F3 - public const int submenuarrow = 2131231219; + public const int stop = 2131231219; // aapt resource value: 0x7F0801F4 - public const int submit_area = 2131231220; + public const int stretch = 2131231220; // aapt resource value: 0x7F0801F5 - public const int supportScrollUp = 2131231221; + public const int submenuarrow = 2131231221; // aapt resource value: 0x7F0801F6 - public const int switchWidget = 2131231222; + public const int submit_area = 2131231222; + + // aapt resource value: 0x7F0801F7 + public const int supportScrollUp = 2131231223; + + // aapt resource value: 0x7F0801F8 + public const int switchWidget = 2131231224; // aapt resource value: 0x7F08000B public const int SYM = 2131230731; - // aapt resource value: 0x7F0801F7 - public const int tabMode = 2131231223; - - // aapt resource value: 0x7F0801F8 - public const int tag_accessibility_actions = 2131231224; - // aapt resource value: 0x7F0801F9 - public const int tag_accessibility_clickable_spans = 2131231225; + public const int tabMode = 2131231225; // aapt resource value: 0x7F0801FA - public const int tag_accessibility_heading = 2131231226; + public const int tag_accessibility_actions = 2131231226; // aapt resource value: 0x7F0801FB - public const int tag_accessibility_pane_title = 2131231227; + public const int tag_accessibility_clickable_spans = 2131231227; // aapt resource value: 0x7F0801FC - public const int tag_on_apply_window_listener = 2131231228; + public const int tag_accessibility_heading = 2131231228; // aapt resource value: 0x7F0801FD - public const int tag_on_receive_content_listener = 2131231229; + public const int tag_accessibility_pane_title = 2131231229; // aapt resource value: 0x7F0801FE - public const int tag_on_receive_content_mime_types = 2131231230; + public const int tag_on_apply_window_listener = 2131231230; // aapt resource value: 0x7F0801FF - public const int tag_screen_reader_focusable = 2131231231; + public const int tag_on_receive_content_listener = 2131231231; // aapt resource value: 0x7F080200 - public const int tag_state_description = 2131231232; + public const int tag_on_receive_content_mime_types = 2131231232; // aapt resource value: 0x7F080201 - public const int tag_transition_group = 2131231233; + public const int tag_screen_reader_focusable = 2131231233; // aapt resource value: 0x7F080202 - public const int tag_unhandled_key_event_manager = 2131231234; + public const int tag_state_description = 2131231234; // aapt resource value: 0x7F080203 - public const int tag_unhandled_key_listeners = 2131231235; + public const int tag_transition_group = 2131231235; // aapt resource value: 0x7F080204 - public const int tag_window_insets_animation_callback = 2131231236; + public const int tag_unhandled_key_event_manager = 2131231236; // aapt resource value: 0x7F080205 - public const int terrain = 2131231237; + public const int tag_unhandled_key_listeners = 2131231237; // aapt resource value: 0x7F080206 - public const int test_checkbox_android_button_tint = 2131231238; + public const int tag_window_insets_animation_callback = 2131231238; // aapt resource value: 0x7F080207 - public const int test_checkbox_app_button_tint = 2131231239; + public const int terrain = 2131231239; // aapt resource value: 0x7F080208 - public const int test_radiobutton_android_button_tint = 2131231240; + public const int test_checkbox_android_button_tint = 2131231240; // aapt resource value: 0x7F080209 - public const int test_radiobutton_app_button_tint = 2131231241; + public const int test_checkbox_app_button_tint = 2131231241; // aapt resource value: 0x7F08020A - public const int text = 2131231242; + public const int test_radiobutton_android_button_tint = 2131231242; // aapt resource value: 0x7F08020B - public const int text1 = 2131231243; + public const int test_radiobutton_app_button_tint = 2131231243; // aapt resource value: 0x7F08020C - public const int text2 = 2131231244; + public const int text = 2131231244; // aapt resource value: 0x7F08020D - public const int textEnd = 2131231245; - - // aapt resource value: 0x7F080215 - public const int textinput_counter = 2131231253; - - // aapt resource value: 0x7F080216 - public const int textinput_error = 2131231254; - - // aapt resource value: 0x7F080217 - public const int textinput_helper_text = 2131231255; - - // aapt resource value: 0x7F080218 - public const int textinput_placeholder = 2131231256; - - // aapt resource value: 0x7F080219 - public const int textinput_prefix_text = 2131231257; - - // aapt resource value: 0x7F08021A - public const int textinput_suffix_text = 2131231258; + public const int text1 = 2131231245; // aapt resource value: 0x7F08020E - public const int textSpacerNoButtons = 2131231246; + public const int text2 = 2131231246; // aapt resource value: 0x7F08020F - public const int textSpacerNoTitle = 2131231247; + public const int textEnd = 2131231247; - // aapt resource value: 0x7F080210 - public const int textStart = 2131231248; + // aapt resource value: 0x7F080217 + public const int textinput_counter = 2131231255; - // aapt resource value: 0x7F080211 - public const int textTop = 2131231249; + // aapt resource value: 0x7F080218 + public const int textinput_error = 2131231256; - // aapt resource value: 0x7F080212 - public const int text_input_end_icon = 2131231250; + // aapt resource value: 0x7F080219 + public const int textinput_helper_text = 2131231257; - // aapt resource value: 0x7F080213 - public const int text_input_error_icon = 2131231251; - - // aapt resource value: 0x7F080214 - public const int text_input_start_icon = 2131231252; + // aapt resource value: 0x7F08021A + public const int textinput_placeholder = 2131231258; // aapt resource value: 0x7F08021B - public const int thing_proto = 2131231259; + public const int textinput_prefix_text = 2131231259; // aapt resource value: 0x7F08021C - public const int time = 2131231260; + public const int textinput_suffix_text = 2131231260; + + // aapt resource value: 0x7F080210 + public const int textSpacerNoButtons = 2131231248; + + // aapt resource value: 0x7F080211 + public const int textSpacerNoTitle = 2131231249; + + // aapt resource value: 0x7F080212 + public const int textStart = 2131231250; + + // aapt resource value: 0x7F080213 + public const int textTop = 2131231251; + + // aapt resource value: 0x7F080214 + public const int text_input_end_icon = 2131231252; + + // aapt resource value: 0x7F080215 + public const int text_input_error_icon = 2131231253; + + // aapt resource value: 0x7F080216 + public const int text_input_start_icon = 2131231254; // aapt resource value: 0x7F08021D - public const int title = 2131231261; + public const int thing_proto = 2131231261; // aapt resource value: 0x7F08021E - public const int titleDividerNoCustom = 2131231262; + public const int time = 2131231262; // aapt resource value: 0x7F08021F - public const int title_template = 2131231263; + public const int title = 2131231263; // aapt resource value: 0x7F080220 - public const int toggle = 2131231264; + public const int titleDividerNoCustom = 2131231264; // aapt resource value: 0x7F080221 - public const int toolbar = 2131231265; + public const int title_template = 2131231265; // aapt resource value: 0x7F080222 - public const int top = 2131231266; + public const int toggle = 2131231266; // aapt resource value: 0x7F080223 - public const int topPanel = 2131231267; + public const int toolbar = 2131231267; + + // aapt resource value: 0x7F080224 + public const int top = 2131231268; + + // aapt resource value: 0x7F080225 + public const int topPanel = 2131231269; // aapt resource value: 0x7F08000C public const int TOP_END = 2131230732; @@ -25847,113 +25853,113 @@ namespace TINK.Droid // aapt resource value: 0x7F08000D public const int TOP_START = 2131230733; - // aapt resource value: 0x7F080224 - public const int touch_outside = 2131231268; - - // aapt resource value: 0x7F080225 - public const int transitionToEnd = 2131231269; - // aapt resource value: 0x7F080226 - public const int transitionToStart = 2131231270; + public const int touch_outside = 2131231270; // aapt resource value: 0x7F080227 - public const int transition_current_scene = 2131231271; + public const int transitionToEnd = 2131231271; // aapt resource value: 0x7F080228 - public const int transition_layout_save = 2131231272; + public const int transitionToStart = 2131231272; // aapt resource value: 0x7F080229 - public const int transition_position = 2131231273; + public const int transition_current_scene = 2131231273; // aapt resource value: 0x7F08022A - public const int transition_scene_layoutid_cache = 2131231274; + public const int transition_layout_save = 2131231274; // aapt resource value: 0x7F08022B - public const int transition_transform = 2131231275; + public const int transition_position = 2131231275; // aapt resource value: 0x7F08022C - public const int triangle = 2131231276; + public const int transition_scene_layoutid_cache = 2131231276; // aapt resource value: 0x7F08022D - public const int @unchecked = 2131231277; + public const int transition_transform = 2131231277; // aapt resource value: 0x7F08022E - public const int uniform = 2131231278; + public const int triangle = 2131231278; // aapt resource value: 0x7F08022F - public const int unlabeled = 2131231279; + public const int @unchecked = 2131231279; // aapt resource value: 0x7F080230 - public const int up = 2131231280; + public const int uniform = 2131231280; // aapt resource value: 0x7F080231 - public const int url = 2131231281; + public const int unlabeled = 2131231281; // aapt resource value: 0x7F080232 - public const int useLogo = 2131231282; + public const int up = 2131231282; // aapt resource value: 0x7F080233 - public const int vertical_only = 2131231283; + public const int url = 2131231283; // aapt resource value: 0x7F080234 - public const int view_offset_helper = 2131231284; + public const int useLogo = 2131231284; // aapt resource value: 0x7F080235 - public const int view_transition = 2131231285; + public const int vertical_only = 2131231285; // aapt resource value: 0x7F080236 - public const int view_tree_lifecycle_owner = 2131231286; + public const int view_offset_helper = 2131231286; // aapt resource value: 0x7F080237 - public const int view_tree_on_back_pressed_dispatcher_owner = 2131231287; + public const int view_transition = 2131231287; // aapt resource value: 0x7F080238 - public const int view_tree_saved_state_registry_owner = 2131231288; + public const int view_tree_lifecycle_owner = 2131231288; // aapt resource value: 0x7F080239 - public const int view_tree_view_model_store_owner = 2131231289; + public const int view_tree_on_back_pressed_dispatcher_owner = 2131231289; // aapt resource value: 0x7F08023A - public const int visible = 2131231290; + public const int view_tree_saved_state_registry_owner = 2131231290; // aapt resource value: 0x7F08023B - public const int visible_removing_fragment_view_tag = 2131231291; + public const int view_tree_view_model_store_owner = 2131231291; // aapt resource value: 0x7F08023C - public const int volume_item_container = 2131231292; + public const int visible = 2131231292; // aapt resource value: 0x7F08023D - public const int webview = 2131231293; + public const int visible_removing_fragment_view_tag = 2131231293; // aapt resource value: 0x7F08023E - public const int west = 2131231294; + public const int volume_item_container = 2131231294; // aapt resource value: 0x7F08023F - public const int wide = 2131231295; - - // aapt resource value: 0x7F080241 - public const int withinBounds = 2131231297; + public const int webview = 2131231295; // aapt resource value: 0x7F080240 - public const int withText = 2131231296; + public const int west = 2131231296; - // aapt resource value: 0x7F080242 - public const int wrap = 2131231298; + // aapt resource value: 0x7F080241 + public const int wide = 2131231297; // aapt resource value: 0x7F080243 - public const int wrap_content = 2131231299; + public const int withinBounds = 2131231299; + + // aapt resource value: 0x7F080242 + public const int withText = 2131231298; // aapt resource value: 0x7F080244 - public const int wrap_content_constrained = 2131231300; + public const int wrap = 2131231300; // aapt resource value: 0x7F080245 - public const int x_left = 2131231301; + public const int wrap_content = 2131231301; // aapt resource value: 0x7F080246 - public const int x_right = 2131231302; + public const int wrap_content_constrained = 2131231302; // aapt resource value: 0x7F080247 - public const int zero_corner_chip = 2131231303; + public const int x_left = 2131231303; + + // aapt resource value: 0x7F080248 + public const int x_right = 2131231304; + + // aapt resource value: 0x7F080249 + public const int zero_corner_chip = 2131231305; static Id() { diff --git a/TINK/TINK.Android/TINK.Android.csproj b/TINK/TINK.Android/TINK.Android.csproj index 389c4e3..e244699 100644 --- a/TINK/TINK.Android/TINK.Android.csproj +++ b/TINK/TINK.Android/TINK.Android.csproj @@ -77,7 +77,7 @@ - + 1.6.3 @@ -86,7 +86,7 @@ 1.6.3 - + @@ -185,7 +185,7 @@ 1.0.0.16 - 1.2.1.9 + 1.3.0 @@ -195,9 +195,9 @@ 1.7.5 - + - 5.0.0.2545 + 5.0.0.2578 5.0.0 diff --git a/TINK/TINK.iOS/Info.plist b/TINK/TINK.iOS/Info.plist index 8ba33f9..ee4f0ee 100644 --- a/TINK/TINK.iOS/Info.plist +++ b/TINK/TINK.iOS/Info.plist @@ -56,8 +56,8 @@ CFBundleDisplayName sharee.bike CFBundleVersion - 361 + 362 CFBundleShortVersionString - 3.0.361 + 3.0.362 diff --git a/TINK/TINK.iOS/TINK.iOS.csproj b/TINK/TINK.iOS/TINK.iOS.csproj index 3588450..b290475 100644 --- a/TINK/TINK.iOS/TINK.iOS.csproj +++ b/TINK/TINK.iOS/TINK.iOS.csproj @@ -121,7 +121,7 @@ - + 1.6.3 @@ -130,7 +130,7 @@ 1.6.3 - + @@ -221,7 +221,7 @@ 0.7.124 - 5.0.0.2545 + 5.0.0.2578 diff --git a/TINK/TINK/App.xaml.cs b/TINK/TINK/App.xaml.cs index 64463ab..96100b1 100644 --- a/TINK/TINK/App.xaml.cs +++ b/TINK/TINK/App.xaml.cs @@ -345,9 +345,9 @@ namespace TINK /// /// Service container to manage geolocation services. /// - public static IServicesContainer LocationServicesContainer { get; } - = new ServicesContainerMutableT( - new HashSet { + public static IServicesContainer LocationServicesContainer { get; } + = new ServicesContainerMutableT( + new HashSet { new LastKnownGeolocationService(DependencyService.Get()), new SimulatedGeolocationService(DependencyService.Get()), new GeolocationAccuracyMediumService(DependencyService.Get()), diff --git a/TINK/TINK/View/Map/MapPage.xaml b/TINK/TINK/View/Map/MapPage.xaml index ab2273d..eb1f5e4 100644 --- a/TINK/TINK/View/Map/MapPage.xaml +++ b/TINK/TINK/View/Map/MapPage.xaml @@ -41,7 +41,6 @@ WidthRequest="320" HeightRequest="800" x:Name="MyMap" - MyLocationEnabled="True" MapType="Street"> diff --git a/TINK/TINK/View/Map/MapPage.xaml.cs b/TINK/TINK/View/Map/MapPage.xaml.cs index 5f1c4aa..2a811dc 100644 --- a/TINK/TINK/View/Map/MapPage.xaml.cs +++ b/TINK/TINK/View/Map/MapPage.xaml.cs @@ -31,9 +31,6 @@ namespace TINK.View.Map public MapPage() { InitializeComponent(); - - MyMap.UiSettings.MyLocationButtonEnabled = true; - } /// @@ -211,6 +208,25 @@ namespace TINK.View.Map isInitializationStarted = false; return; } + + try + { + Log.ForContext().Verbose("Setting map settings."); + + //show current user position (blue dot) and enable button for centering map manually. + MyMap.UiSettings.MyLocationButtonEnabled = MapPageViewModel.IsLocationPermissionGranted; + MyMap.IsShowingUser = MapPageViewModel.IsLocationPermissionGranted; + + //disable +/- buttons + MyMap.UiSettings.ZoomControlsEnabled = false; + } + catch (Exception exception) + { + Log.ForContext().Verbose("Setting map settings failed. {Exception}", exception); + isInitializationStarted = false; + return; + } + } /// diff --git a/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/IBikeInfoMutable.cs b/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/IBikeInfoMutable.cs index 29c3c2e..9495016 100644 --- a/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/IBikeInfoMutable.cs +++ b/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/IBikeInfoMutable.cs @@ -1,6 +1,6 @@ -namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock +namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock { - public interface IBikeInfoMutable : BikeInfoNS.BC.IBikeInfoMutable + public interface IBikeInfoMutable : BC.IBikeInfoMutable { ILockInfoMutable LockInfo { get; } } diff --git a/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/ILockInfoMutable.cs b/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/ILockInfoMutable.cs index b4b1af4..11d134c 100644 --- a/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/ILockInfoMutable.cs +++ b/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/ILockInfoMutable.cs @@ -1,4 +1,5 @@ using System; +using TINK.Services.Geolocation; namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock { @@ -20,6 +21,14 @@ namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock byte[] Seed { get; } + /// Timestamp of the last locking state change. + DateTime? LastLockingStateChange { get; } + + /// + /// Gets or sets the current location of the bike, null if location is unknown. + /// + IGeolocation Location { get; set; } + /// /// Gets the version info of the locks. /// diff --git a/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/LockInfoMutable.cs b/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/LockInfoMutable.cs index bda72f1..c348e52 100644 --- a/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/LockInfoMutable.cs +++ b/TINKLib/Model/Bikes/BikeInfoNS/BluetoothLock/LockInfoMutable.cs @@ -1,4 +1,5 @@ using System; +using TINK.Services.Geolocation; namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock { @@ -7,16 +8,24 @@ namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock /// Lock info object. private LockInfo LockInfo { get; set; } + /// + /// Delegate to create time stamp. + /// + private Func _nowDelegate; + /// Constructs a bluetooth lock info object. /// Id of lock must always been known when constructing an lock info object. + /// Delegate to create time stamp if null DateTime.Now is used. public LockInfoMutable( int id, Guid guid, byte[] userKey, byte[] adminKey, byte[] seed, - LockingState state) + LockingState state, + Func nowDelegate = null) { + _nowDelegate = nowDelegate ?? (() => DateTime.Now); LockInfo = new LockInfo.Builder() { Id = id, Guid = guid, UserKey = userKey, AdminKey = adminKey, Seed = seed, State = state }.Build(); } @@ -35,12 +44,34 @@ namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock public byte[] AdminKey => LockInfo.AdminKey; + /// + /// Gets or sets the locking state. + /// public LockingState State { get => LockInfo.State; - set => LockInfo = new LockInfo.Builder(LockInfo) { State = value }.Build(); + set + { + if (LockInfo.State == value) + { + // State does not change, nothing to do. + return; + } + + Location = null; // Invalidate location. + LastLockingStateChange = _nowDelegate(); // Get time stamp when state change happened. + LockInfo = new LockInfo.Builder(LockInfo) { State = value }.Build(); + } } + /// Gets the timestamp of the last locking state change. + public DateTime? LastLockingStateChange { get; private set; } + + /// + /// Gets or sets the current location of the bike, null if location is unknown. + /// + public IGeolocation Location { get; set; } + /// Holds the percentage of lock battery. public double BatteryPercentage { get; set; } = double.NaN; diff --git a/TINKLib/Model/IPosition.cs b/TINKLib/Model/IPosition.cs index a7049b2..8ba3cc4 100644 --- a/TINKLib/Model/IPosition.cs +++ b/TINKLib/Model/IPosition.cs @@ -1,7 +1,10 @@ -using System; +using System; namespace TINK.Model { + /// + /// Holds a exact position. + /// public interface IPosition : IEquatable { double Latitude { get; } diff --git a/TINKLib/Model/Settings/JsonSettingsDictionary.cs b/TINKLib/Model/Settings/JsonSettingsDictionary.cs index abdae4b..8a34d7b 100644 --- a/TINKLib/Model/Settings/JsonSettingsDictionary.cs +++ b/TINKLib/Model/Settings/JsonSettingsDictionary.cs @@ -409,7 +409,7 @@ namespace TINK.Model.Settings return targetDictionary.Union(new Dictionary { - { typeof(IGeolocation).Name, activeGeolocationService }, + { typeof(IGeolocationService).Name, activeGeolocationService }, }).ToDictionary(key => key.Key, value => value.Value); } @@ -419,7 +419,7 @@ namespace TINK.Model.Settings public static string GetActiveGeolocationService(this IDictionary settingsJSON) { // Get uri of corpi server. - if (!settingsJSON.TryGetValue(typeof(IGeolocation).Name, out string activeGeolocationService) + if (!settingsJSON.TryGetValue(typeof(IGeolocationService).Name, out string activeGeolocationService) || string.IsNullOrEmpty(activeGeolocationService)) { // File holds no entry. diff --git a/TINKLib/Model/TinkApp.cs b/TINKLib/Model/TinkApp.cs index 8a07e71..1eddc29 100644 --- a/TINKLib/Model/TinkApp.cs +++ b/TINKLib/Model/TinkApp.cs @@ -176,7 +176,7 @@ namespace TINK.Model string merchantId, IBluetoothLE bluetoothService, ILocationPermission locationPermissionsService, - IServicesContainer locationServicesContainer, + IServicesContainer locationServicesContainer, ILocksService locksService, ISmartDevice device, ISpecialFolder specialFolder, @@ -406,7 +406,7 @@ namespace TINK.Model public LocksServicesContainerMutable LocksServices { get; set; } /// Holds available app themes. - public IServicesContainer GeolocationServices { get; } + public IServicesContainer GeolocationServices { get; } /// Holds the flavor of the app, i.e. specifies if app is sharee.bike, Mein konrad or Lastenrad Bayern. public AppFlavor Flavor { get; private set; } diff --git a/TINKLib/Model/WhatsNew.cs b/TINKLib/Model/WhatsNew.cs index 6fbd728..8de4baf 100644 --- a/TINKLib/Model/WhatsNew.cs +++ b/TINKLib/Model/WhatsNew.cs @@ -672,16 +672,21 @@ namespace TINK.Model new Version(3, 0, 356), AppResources.ChangeLog3_0_231 }, - { + { new Version(3, 0, 360), AppResources.ChangeLog_3_0_358_MK_SB, new List { AppFlavor.MeinKonrad, AppFlavor.ShareeBike } }, - { + { new Version(3, 0, 361), AppResources.ChangeLog_3_0_361_MK_SB, new List { AppFlavor.MeinKonrad, AppFlavor.ShareeBike } }, + { + new Version(3, 0, 362), + AppResources.ChangeLog_3_0_362_MK_SB, + new List { AppFlavor.MeinKonrad, AppFlavor.ShareeBike } + }, }; /// Manges the whats new information. diff --git a/TINKLib/MultilingualResources/AppResources.Designer.cs b/TINKLib/MultilingualResources/AppResources.Designer.cs index 7636d4c..1f3363b 100644 --- a/TINKLib/MultilingualResources/AppResources.Designer.cs +++ b/TINKLib/MultilingualResources/AppResources.Designer.cs @@ -88,7 +88,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Close lock & return bike. + /// Looks up a localized string similar to Close lock & end rental. /// public static string ActionCloseAndReturn { get { @@ -97,7 +97,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Feedback about the App. + /// Looks up a localized string similar to Feedback about the app. /// public static string ActionContactMailAppReleated { get { @@ -115,7 +115,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Give Feedback. + /// Looks up a localized string similar to Give feedback. /// public static string ActionGiveFeedback { get { @@ -142,7 +142,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Register. + /// Looks up a localized string similar to Register for free. /// public static string ActionLoginRegister { get { @@ -187,7 +187,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Return bike. + /// Looks up a localized string similar to End rental. /// public static string ActionReturn { get { @@ -331,7 +331,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to No web error on updating locking status.. + /// Looks up a localized string similar to Internet must be available for updating lock status. Please establish an Internet connection!. /// public static string ActivityTextErrorNoWebUpdateingLockstate { get { @@ -466,7 +466,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Loading reserved/ booked bikes.... + /// Looks up a localized string similar to Loading reserved/rented bikes.... /// public static string ActivityTextMyBikesLoadingBikes { get { @@ -565,7 +565,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Returning bike.... + /// Looks up a localized string similar to Ending rental.... /// public static string ActivityTextReturningBike { get { @@ -610,7 +610,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Starting bike return.... + /// Looks up a localized string similar to Starting end rental.... /// public static string ActivityTextStartReturningBike { get { @@ -766,6 +766,21 @@ namespace TINK.MultilingualResources { } } + /// + /// Looks up a localized string similar to Some terms have been standardized, e.g:<br/> + ///- what used to be called 'return bike' is now always called 'end rental'.<br/> + ///- The 'operator' is the group of people responsible for the bike fleet, who will be contacted if necessary.<br/> + ///<br/> + ///Also:<br/> + ///- Minor bug fixes<br/> + ///- Package updates. + /// + public static string ChangeLog_3_0_362_MK_SB { + get { + return ResourceManager.GetString("ChangeLog_3_0_362_MK_SB", resourceCulture); + } + } + /// /// Looks up a localized string similar to We have fixed some bugs. Enjoy the ride!. /// @@ -960,7 +975,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Feedback dialog added which is shown after returning bike.. + /// Looks up a localized string similar to Feedback dialog added which is shown after ending rental.. /// public static string ChangeLog3_0_227 { get { @@ -1017,7 +1032,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Hard- and software information send to backend when returning bike.. + /// Looks up a localized string similar to Hard- and software information send to backend when ending rental.. /// public static string ChangeLog3_0_237 { get { @@ -1387,6 +1402,17 @@ namespace TINK.MultilingualResources { } } + /// + /// Looks up a localized string similar to We could not assign the bike to any station. For this we need your location information while you are standing right next to the bike. Only then your rental can be terminated! + /// + ///Approach the bike, turn on Bluetooth and Location services and try again.. + /// + public static string Error_ReturnBike_Station_Location_Message { + get { + return ResourceManager.GetString("Error_ReturnBike_Station_Location_Message", resourceCulture); + } + } + /// /// Looks up a localized string similar to Failed to query available bikes.. /// @@ -1415,12 +1441,13 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Unfortunately, it is still not possible to establish a connection between your mobile device and the bike lock. Please contact customer support. + /// Looks up a localized string similar to It is still not possible to establish a connection between your mobile device and the bike lock. Please contact operator! /// - ///As a last resort, please close the lock by hand AND contact customer support so that they can terminate your chargeable rental. To do this: - ///1. close the app, - ///2. press the button at the top of the lock briefly and quickly release it as soon as it starts flashing, - ///3. wait until the lock is completely closed and remains closed.. + ///Alternative: + ///1. close app, + ///2. press the button at the top of the lock briefly and release it as soon as it starts flashing, + ///3. make sure that the lock is completely closed and remains closed. + ///4. send e-mail to operator (otherwise your chargeable rental will continue!): Problem description, Drop-off station.. /// public static string ErrorBookedSearchMessageEscalationLevel2 { get { @@ -1457,7 +1484,7 @@ namespace TINK.MultilingualResources { /// /// Looks up a localized string similar to Lock cannot be closed until bike is near. - ///Please try again to close bike or report bike to support!. + ///Please try again to close bike or report bike to operator!. /// public static string ErrorCloseLockOutOfReachStateReservedMessage { get { @@ -1493,7 +1520,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Please try to lock again or report bike to support! + /// Looks up a localized string similar to Please try to lock again or report bike to operator! ///{0}. /// public static string ErrorCloseLockUnkErrorMessage { @@ -1512,7 +1539,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Internet must be reachable to connect to lock of rented bike.. + /// Looks up a localized string similar to Internet must be reachable to connect to lock of rented bike. Please establish an Internet connection!. /// public static string ErrorConnectLockRentedBikeNoWebMessage { get { @@ -1521,7 +1548,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Internet must be reachable to connect to lock of reserved bike.. + /// Looks up a localized string similar to Internet must be reachable to connect to lock of reserved bike. Please establish an Internet connection!. /// public static string ErrorConnectLockReservedBikeNoWebMessage { get { @@ -1539,7 +1566,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Please turn Location on, otherwise lock cannot be connected.. + /// Looks up a localized string similar to Please turn location services on, otherwise lock cannot be connected.. /// public static string ErrorFindLockLocationOff { get { @@ -1611,11 +1638,11 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to The lock could not be opened correctly. Please try again. + /// Looks up a localized string similar to The lock could not be opened correctly. Try again! /// ///Attention! Your rental has already started. - /// - ///If the lock still won't open, make sure the lock is closed and return the bike. Please report it to the support!. + ///If the lock still won't open, make sure the lock is closed and end rental. + ///Important: Send an email to the operator (otherwise your paid rental will continue!) with: Problem description, bike number, drop-off station.. /// public static string ErrorOpenLockBoldStatusIsUnknownMessage { get { @@ -1678,10 +1705,20 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Returning bike at an unknown location is not possible. - ///Bike can be returned if + /// Looks up a localized string similar to End rental at an unknown location is not possible. + ///Getting geolocation failed.. + /// + public static string ErrorReturnBikeLockClosedGetGPSExceptionMessage { + get { + return ResourceManager.GetString("ErrorReturnBikeLockClosedGetGPSExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End rental at an unknown location is not possible. + ///Rental can be ended if ///- location information is available when closing lock - ///- bike is in reach and location information is available when pressing button "Return bike". + ///- bike is in reach and location information is available when pressing button "End rental". /// public static string ErrorReturnBikeLockClosedNoGPSMessage { get { @@ -1690,8 +1727,18 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Returning bike at an unknown location is not possible. - ///Bike can only be returned if bike is in reach and location information is available.. + /// Looks up a localized string similar to End rental at an unknown location is not possible. + ///Start getting geolocation failed.. + /// + public static string ErrorReturnBikeLockClosedStartGetGPSExceptionMessage { + get { + return ResourceManager.GetString("ErrorReturnBikeLockClosedStartGetGPSExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End rental at an unknown location is not possible. + ///Rental can only be ended if bike is in reach and location information is available.. /// public static string ErrorReturnBikeLockOpenNoGPSMessage { get { @@ -1700,7 +1747,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Returning bike outside of station is not possible. Distance to station {0} is {1} m.. + /// Looks up a localized string similar to End rental outside of station is not possible. Distance to station {0} is {1} m.. /// public static string ErrorReturnBikeNotAtStationMessage { get { @@ -1709,7 +1756,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Internet must be available when returning the bike.. + /// Looks up a localized string similar to Internet must be available when ending rental. Please establish an Internet connection!. /// public static string ErrorReturnBikeNoWebMessage { get { @@ -1718,7 +1765,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Connection error when returning the bike!. + /// Looks up a localized string similar to Connection error when ending rental.. /// public static string ErrorReturnBikeNoWebTitle { get { @@ -1727,7 +1774,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Error returning bike!. + /// Looks up a localized string similar to Error at ending rental!. /// public static string ErrorReturnBikeTitle { get { @@ -1763,7 +1810,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Opening mail app failed.. + /// Looks up a localized string similar to Opening mail app failed. Make sure you have a mail app installed on your mobile device!. /// public static string ErrorSupportmailMailingFailed { get { @@ -1772,7 +1819,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Opening phone app failed.. + /// Looks up a localized string similar to Opening phone app failed. Make sure you have a phone app installed on your mobile device!. /// public static string ErrorSupportmailPhoningFailed { get { @@ -1781,7 +1828,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to The rental of bike No. {0} has failed.. + /// Looks up a localized string similar to The rental of bike {0} has failed.. /// public static string ExceptionTextRentingBikeFailedGeneral { get { @@ -1790,7 +1837,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to The rental of bike No. {0} has failed, the bike is currently unavailable.{1}. + /// Looks up a localized string similar to The rental of bike {0} has failed, the bike is currently unavailable. {1}. /// public static string ExceptionTextRentingBikeFailedUnavailalbe { get { @@ -1799,7 +1846,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to The reservation of bike no. {0} has failed.. + /// Looks up a localized string similar to The reservation of bike {0} has failed.. /// public static string ExceptionTextReservationBikeFailedGeneral { get { @@ -1808,7 +1855,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to The reservation of bike No. {0} has failed, the bike is currently unavailable.{1}. + /// Looks up a localized string similar to The reservation of bike {0} has failed, the bike is currently unavailable. {1}. /// public static string ExceptionTextReservationBikeFailedUnavailalbe { get { @@ -1826,7 +1873,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Is WIFI available/ mobile network available and mobile data activated / ... ?. + /// Looks up a localized string similar to Is WIFI/mobile network available and mobile data activated?. /// public static string ExceptionTextWebConnectFailureException { get { @@ -1900,7 +1947,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Contact Operator.. + /// Looks up a localized string similar to Contact operator.. /// public static string MarkingBikeSharingOperatorNoOperatorInfoAvailable { get { @@ -2153,7 +2200,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to At least 8 characters. + /// Looks up a localized string similar to At least eight characters. /// public static string MarkingLoginPasswordLabel { get { @@ -2198,7 +2245,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to There are currently no bicycles reserved/booked on user {0}.. + /// Looks up a localized string similar to There are currently no bikes reserved/rented by user {0}.. /// public static string MarkingMyBikesNoBikesReservedRented { get { @@ -2207,7 +2254,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Oops, there is no internet connection.. + /// Looks up a localized string similar to Oops, there is no Internet connection.. /// public static string MarkingNoNetworkConnection { get { @@ -2243,7 +2290,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Bike successfully returned!. + /// Looks up a localized string similar to Rental successfully ended!. /// public static string MarkingReturnBikeMainMessage { get { @@ -2270,7 +2317,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Show/ hide. + /// Looks up a localized string similar to Show/hide. /// public static string MarkingShowHideBikesOfType { get { @@ -2505,7 +2552,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Rental fees. + /// Looks up a localized string similar to Rental charges. /// public static string MessageBikesManagementTariffDescriptionFeeEuroPerHour { get { @@ -2532,7 +2579,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Max. fee. + /// Looks up a localized string similar to Max. charges. /// public static string MessageBikesManagementTariffDescriptionMaxFeeEuroPerDay { get { @@ -2606,7 +2653,7 @@ namespace TINK.MultilingualResources { /// /// Looks up a localized string similar to This version of the {0} App is not compatible with server detected. - ///Please contact the support for help.. + ///Please contact operator for help.. /// public static string MessageCopriVersionIsOutdated { get { @@ -2663,7 +2710,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Error Start Query Location!. + /// Looks up a localized string similar to Error start query location!. /// public static string MessageErrorQueryLocationStartTitle { get { @@ -2672,7 +2719,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Error Query Location!. + /// Looks up a localized string similar to Error query location!. /// public static string MessageErrorQueryLocationTitle { get { @@ -2781,7 +2828,7 @@ namespace TINK.MultilingualResources { /// /// Looks up a localized string similar to Session has expired. - ///Please login to app once again.. + ///Please log in again.. /// public static string MessageMapPageErrorAuthcookieUndefined { get { @@ -2790,7 +2837,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to An error occurred switching from cargo bikes/ city bikes. + /// Looks up a localized string similar to An error occurred switching between cargo and city bikes. ///{0}. /// public static string MessageMapPageErrorSwitch { @@ -2818,7 +2865,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Are you enjoying the {0}-App?. + /// Looks up a localized string similar to Are you enjoying the {0}-app?. /// public static string MessageRateMail { get { @@ -2845,7 +2892,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to A rental of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made.. + /// Looks up a localized string similar to A rental of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made.. /// public static string MessageRentingBikeErrorTooManyReservationsRentals { get { @@ -2854,7 +2901,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made.. + /// Looks up a localized string similar to A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made.. /// public static string MessageReservationBikeErrorTooManyReservationsRentals { get { @@ -2926,7 +2973,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to {0}-App Releated Request. + /// Looks up a localized string similar to {0}-app releated request. /// public static string MiscContactMailAppReleatedSubject { get { @@ -2971,7 +3018,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Close lock and return bike {0}?. + /// Looks up a localized string similar to Close lock and end rental of bike {0}?. /// public static string QuestionCloseLockAndReturnBike { get { @@ -2998,7 +3045,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Return bike {0}?. + /// Looks up a localized string similar to End rental of bike {0}?. /// public static string QuestionReturnBike { get { @@ -3036,7 +3083,7 @@ namespace TINK.MultilingualResources { /// /// Looks up a localized string similar to I hereby consent to the transmission of my log file. /// - ///The log file contains your app usage data as well as system information. The data will only be used for diagnostic purposes or to improve the app.. + ///The log file contains your app usage data as well as system information. The data will only be used for diagnostic purposes or to improve the app and then deleted.. /// public static string QuestionSupportmailAttachment { get { @@ -3045,7 +3092,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to Does your request/ comment relate to the {0}-app or to a more general subject?. + /// Looks up a localized string similar to Does your request/comment relate to the {0}-app or to a more general subject?. /// public static string QuestionSupportmailSubject { get { @@ -3135,7 +3182,7 @@ namespace TINK.MultilingualResources { } /// - /// Looks up a localized string similar to The remaining power of the bike battery was low recently. Please check it on the bike display before riding. The bike can be returned within 5 minutes free of charge.. + /// Looks up a localized string similar to The remaining power of the bike battery was low recently. Please check it on the bike display before riding. The rental can be canceled within 5 minutes free of charge.. /// public static string StatusTextLowBatteryLevel { get { diff --git a/TINKLib/MultilingualResources/AppResources.de.resx b/TINKLib/MultilingualResources/AppResources.de.resx index f90f00a..e38c8ef 100644 --- a/TINKLib/MultilingualResources/AppResources.de.resx +++ b/TINKLib/MultilingualResources/AppResources.de.resx @@ -43,7 +43,7 @@ Radstandorte - Benutzer {0} erfolgreich angemeldet. + Nutzer {0} erfolgreich angemeldet. Willkommen! @@ -58,13 +58,13 @@ Angemeldet als {0} bei {1}. - Kein Benutzer angemeldet. + Kein Nutzer angemeldet. Diese Version der {0} App ist veraltet. Bitte auf aktuelle Version aktualisieren. - Betrifft die Anfrage/ Anmerkung die {0}-App oder ein allgemeines Thema? + Betrifft die Anfrage/Anmerkung die {0}-App oder ein allgemeines Thema? {0}-App Anfrage @@ -100,22 +100,22 @@ Tarife - Schloss ist blockiert. Bitte sicherstellen, dass keine Speiche oder ein anderer Gegenstand das Schloss blockiert und Vorgang wiederholen. + Schloss ist blockiert. Bitte stellen Sie sicher, dass keine Speiche oder ein anderer Gegenstand das Schloss blockiert und wiederholen Sie den Vorgang. Schloss kann erst geschlossen werden, wenn Rad nicht mehr bewegt wird. Bitte Rad abstellen und Vorgang wiederholen. - Ihr mobiles Gerät verbindet sich nicht mit dem Fahrradschloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. + Ihr mobiles Gerät verbindet sich nicht mit dem Schloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. - Ihr mobiles Gerät verbindet sich nicht mit dem Fahrradschloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. + Ihr mobiles Gerät verbindet sich nicht mit dem Schloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. Lade Räder an Station... - Lade meine Räder... + Lade reservierte/gemietete Räder... Suche Schlösser... @@ -127,29 +127,29 @@ Lade Stationen und Räder... - Rückgabe ausserhalb von Station nicht möglich. Entfernung zur Station {0} ist {1} m. + Rückgabe außerhalb einer Station nicht möglich. Entfernung zur nächsten Station {0} beträgt {1} m. - Fehler bei Radrückgabe! + Fehler beim Beenden der Miete! - Fahrradrückgabe an unbekanntem Standort nicht möglich. -Eine Radrückgabe ist möglich, wenn -- beim Schliessen des Schlosses Standortinformation verfügbar ist -- beim Drücken von "Rad zurückgeben" das Rad in Reichweite ist und Standortinformation verfügbar ist. + Beenden der Miete an unbekanntem Standort nicht möglich. +Ein Mietende ist möglich, wenn +- beim Schließen des Schlosses Standortinformation verfügbar ist +- beim Drücken von "Miete beenden" das Rad in Reichweite ist und Standortinformation verfügbar ist - Fahrradrückgabe an unbekanntem Standort nicht möglich. -Eine Radrückgabe ist nur möglich, wenn das Rad in Reichweite ist und Standortinformation verfügbar ist. + Beenden der Miete an unbekanntem Standort nicht möglich. +Mietende ist nur möglich, wenn das Rad in Reichweite ist und Standortinformation verfügbar ist. - Mailanhang konnte nich erzeugt werden. + Anhang konnte nich erzeugt werden. - Mailapp konnte nicht geöffnet werden. + Mailapp konnte nicht geöffnet werden. Stellen Sie sicher, dass auf Ihrem mobilen Gerät eine Mailapp installiert und eingerichtet ist! - Telefonapp konnte nicht geöffnet werden. + Telefonapp konnte nicht geöffnet werden. Stellen Sie sicher, dass auf Ihrem mobilen Gerät eine Telefonapp installiert ist! OK @@ -158,7 +158,7 @@ Eine Radrückgabe ist nur möglich, wenn das Rad in Reichweite ist und Standorti Fragen? Hinweise? - Gefällt die {0}-App? + Gefällt Ihnen die {0}-App? Warnung @@ -172,14 +172,14 @@ Eine Radrückgabe ist nur möglich, wenn das Rad in Reichweite ist und Standorti Hiermit stimme ich der Übermittlung meiner Protokolldatei zu. -Die Protokolldatei enthält Ihre App-Nutzungsdaten sowie Systeminformationen. Die Daten werden ausschließlich für Diagnosezwecke bzw. Verbesserung der App verwendet. +Die Protokolldatei enthält Ihre App-Nutzungsdaten sowie Systeminformationen. Die Daten werden ausschließlich für Diagnosezwecke bzw. Verbesserung der App verwendet und werden anschließend gelöscht. Frage Sitzung ist abgelaufen. -Bitte erneut in App anmelden. +Bitte melden Sie sich erneut an. Code ist {0}, max. Reservierungszeit von {1} Min. abgelaufen. @@ -209,7 +209,7 @@ Bitte erneut in App anmelden. - Frei. + Verfügbar. Code {0}, Standort {1}, gemietet seit {2}. @@ -234,7 +234,7 @@ Bitte erneut in App anmelden. Passwort vergessen - Registrieren + Kostenlos registrieren E-Mail @@ -243,7 +243,7 @@ Bitte erneut in App anmelden. E-Mail - Mindestens 8 Zeichen + Mindestens acht Zeichen Passwort @@ -270,45 +270,45 @@ Bitte erneut in App anmelden. Fehler bei der Anmeldung! - Bitte mit dem Internet verbinden zum Wiederherstellen des Passworts. + Zur Wiederherstellung des Passworts bitte mit dem Internet verbinden. - Bitte mit dem Internet verbinden zum Registrieren. + Zur Registrierung bitte mit dem Internet verbinden. Hinweis - Nach Versuch Schloss zu öffnen wird Status geschlossen zurückgemeldet. + Nach Versuch das Schloss zu öffnen, wird Status "geschlossen" zurückgemeldet. Schloss kann erst geöffnet werden, wenn Rad in der Nähe ist. - Schloss kann erst geschlossen werden, wenn das Rad in der Nähe ist. + Schloss kann erst geschlossen werden, wenn Rad in der Nähe ist. - Schloss kann erst geschlossen werden, wenn das Rad in der Nähe ist. -Bitte Schließen nochmals versuchen oder Rad dem Support melden! + Schloss kann erst geschlossen werden, wenn Rad in der Nähe ist. +Bitte Schließen nochmals versuchen oder Rad dem Betreiber melden! Schloss kann nicht geschlossen werden! - Nach Versuch Schloss zu schließen wird Status geöffnet zurückgemeldet. + Nach Versuch Schloss zu schließen, wird Status "offen" zurückgemeldet. Schloss meldet Status "{0}". - Bitte schließen nochmals versuchen oder Rad dem Support melden! + Bitte Schließen nochmals versuchen oder Rad dem Betreiber melden! {0} - Bitte Standortfreigabe erlauben, damit Fahrradschloss/ Schlösser verwaltet werden können. + Bitte Standortfreigabe erlauben, damit Schloss/-schlösser verwaltet werden können. - Bitte Standortfreigabe erlauben, damit Fahrradschloss/ Schlösser verwaltet werden können. + Bitte Standortfreigabe erlauben, damit Radschloss/-schlösser verwaltet werden können. Freigabedialog öffen? @@ -316,7 +316,7 @@ Freigabedialog öffen? Freigabedialog öffen? - Bitte Standort aktivieren, damit Fahrradschloss gefunden werden kann! + Bitte Standort aktivieren, damit Schloss gefunden werden kann! Nein @@ -325,7 +325,7 @@ Freigabedialog öffen? Ja - Bitte Bluetooth aktivieren, damit Fahrradschloss/ Schlösser verwaltet werden können. + Bitte Bluetooth aktivieren, damit Schloss/-schlösser verwaltet werden können. Schloss suchen @@ -334,28 +334,28 @@ Freigabedialog öffen? Einen Moment bitte... - <h4><b>Schloss öffnet.<br/>Bitte warten Sie bis es komplett geöffnet ist.</b></h4> + <h4><b>Schloss öffnet.<br/>Bitte warten Sie, bis es komplett geöffnet ist.</b></h4> - Starte Aktualisierung... + Aktualisiere... Aktualisiere Schlossstatus... - Lese Akkustatus... + Lese Akkustand... - Statusfehler beim Aktualisieren des Schlossstatusses. + Statusfehler beim Aktualisieren des Schlossstatus. - Verbingungsfehler beim Aktualisieren des Schlossstatusses. + Verbingungsfehler beim Aktualisieren des Schlossstatus. - Kein Netz beim Aktualisieren des Schlossstatusses. + Um den Schlossstatus zu aktualisieren, wird Internet benötigt. Bitte stellen Sie eine Internetverbindung her! - <h4><b>Schloss schließt.<br/>Bitte warten Sie bis es komplett geschlossen ist.</b></h4> + <h4><b>Schloss schließt.<br/>Bitte warten Sie, bis es komplett geschlossen ist.</b></h4> Aktualisierrt auf aktuelle Schloss-Firmware. @@ -378,10 +378,10 @@ Zielplatform Android 11. Reserviere Rad... - Akkustatus kann nicht gelesen werden. + Akkustand kann nicht gelesen werden. - Akkustatus kann erst gelesen werden, wenn Rad in der Nähe ist. + Akkuladestand kann erst gelesen werden, wenn Rad in der Nähe ist. Miete Rad... @@ -393,10 +393,10 @@ Zielplatform Android 11. Fehler beim Mieten des Rads! - Eine Miete des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/ Buchungen bereits getätigt wurden. + Eine Miete des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/Mieten bereits getätigt wurden. - Eine Reservierung des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/ Buchungen bereits getätigt wurden. + Eine Reservierung des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/Mieten bereits getätigt wurden. Achtung: Schloss wird geschlossen! @@ -408,16 +408,16 @@ Zielplatform Android 11. {0} - Die Miete des Fahrads Nr. {0} ist fehlgeschlagen. + Die Miete des Rads {0} ist fehlgeschlagen. - Die Miete des Rads Nr. {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} + Die Miete des Rads {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} - Die Reservierung des Fahrads Nr. {0} ist fehlgeschlagen. + Die Reservierung des Rads {0} ist fehlgeschlagen. - Die Reservierung des Rads Nr. {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} + Die Reservierung des Rads {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} Kleinere Fehlerbehebungen. @@ -430,8 +430,8 @@ Zielplatform Android 11. Ungülitiger Status von Rad {0} erkannt. -Ein nicht reserviertes oder gemietetes Rad sollte immer getrennt sein . -Bitte App neu starten um Rad Infos zu bekommen. +Ein nicht reserviertes oder gemietetes Rad sollte immer getrennt sein. +Bitte App neu starten, um Radinfos zu bekommen. Ungültiger Mietstatus von Rad {0} erkannt. @@ -442,13 +442,13 @@ Bitte App neu starten um Rad Infos zu bekommen. Reservierung aufheben... - Reservierung für Fahrrad {0} aufheben? + Reservierung für Rad {0} aufheben? Kleinere Fehlerbehebung: Verbindung wird getrennt, sobald Rad verfügbar ist. - Fahrrad {0} kostenlos für {1} Min. reservieren? + Rad {0} kostenlos für {1} Min. reservieren? Verbindungsfehler: Deserialisierung fehlgeschlagen. @@ -469,7 +469,7 @@ Bitte App neu starten um Rad Infos zu bekommen. Abo-Preis - Mietgebühren + Mietkosten Gratis Nutzung @@ -524,7 +524,7 @@ Bitte App neu starten um Rad Infos zu bekommen. Diese Version der {0} App ist nicht kompatibel mit dem erkannten Server. -Bitte kontaktieren sie den Support! +Bitte kontaktieren sie den Betreiber! Aktualisiert auf aktuelle Serverversion. @@ -539,7 +539,7 @@ Bitte kontaktieren sie den Support! Verbindungsfehler. Statusbeschreibung: {0}. - Verbindungsfehler. Status statucode: {0}. + Verbindungsfehler. Statuscode: {0}. Seite zur Eingabe von Rückmeldungen hinzugefügt, der nach Rückgabe eines Rads angezeigt wird. @@ -548,7 +548,7 @@ Bitte kontaktieren sie den Support! Offline. - Cache Daten. + Cache genutzt. Ihre Rückmeldung konnte nicht an den Server übermittelt werden. @@ -573,7 +573,7 @@ Fehlerhandling verbessert. Veraltetes Objekt durch aktuelles ersetzt. - Fehler beim Schloss Öffnen! + Fehler beim Öffnen des Schlosses! Anzeige von Stationsnamen statt Nummern. @@ -602,7 +602,7 @@ Layout Anzeige Radnamen und nummern verbessert. {0} <u>kontaktieren</u>. - Bitte Anmelden um Fahrräder zu reservieren! <font color="blue"><u>Hier</u></font> tippen, um auf Anmeldeseite zu wechseln. + Bitte Anmelden, um Räder zu reservieren! <font color="blue"><u>Hier</u></font> tippen, um auf Anmeldeseite zu wechseln. Betreiber kontaktieren? @@ -611,7 +611,7 @@ Layout Anzeige Radnamen und nummern verbessert. Auf der Kontaktseite werden Kontaktinformationen betreiberspezifisch angezeigt. - Station Auswählen + Station auswählen Station auswählen @@ -629,7 +629,7 @@ Layout Anzeige Radnamen und nummern verbessert. Betreiber: {0}. - Betreiber Kontaktieren. + Betreiber kontaktieren. Bitte eine Antwort auswählen. @@ -669,23 +669,23 @@ Kleinere Verbesserungen. Start Standortabfrage... - Fahrrad {0} abschließen und zurückgeben? + Rad {0} abschließen und Miete beenden? - Fahrrad {0} zurückgeben? + Miete von Rad {0} beenden? - Gebe Rad zurück... + Beende Miete... - Fahrrad {0} mieten und Schloss öffnen? + Rad {0} mieten und Schloss öffnen? - Internet muss erreichbar sein beim Zurückgeben des Rads. + Um die Miete zu beenden, wird Internet benötigt. Bitte stellen Sie eine Internetverbindung her! - Verbingungsfehler beim Zurückgeben des Rads! + Verbingungsfehler beim Beenden der Miete! Abschließen von Rad und Radrückgabe beschleunigt. @@ -730,20 +730,20 @@ Anzeige von Statusinformationen erweitert. Fehlerbehebung: Supportmails können wieder verschickt werden. - Beim Umschalten zwischen Lasten-/ Stadträdern ist ein Fehler aufgetreten. + Beim Umschalten zwischen Lasten- und Stadträdern ist ein Fehler aufgetreten. {0} - Kein Fahrrad mit Id {0} gefunden. + Kein Rad mit ID {0} gefunden. - Fehler beim Rad Wählen! + Fehler beim Auswählen des Rads! Fehlerbehebung: App schließt sich nicht mehr auf Fahrrad Wählen-Seite. - Ihr mobiles Gerät verbindet sich immer noch nicht mit dem Fahrradschloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. + Ihr mobiles Gerät verbindet sich immer noch nicht mit dem Schloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. Abbrechen @@ -755,12 +755,13 @@ Fehlerbehebung: Supportmails können wieder verschickt werden. Fehler beim Verbinden mit Schloss! - Es kann leider weiterhin keine Verbindung zwischen Ihrem mobilen Gerät und dem Fahrradschloss aufgebaut werden. Bitte kontaktieren Sie den Kundensupport. + Es kann weiterhin keine Verbindung zwischen Ihrem mobilen Gerät und dem Schloss aufgebaut werden. Rufen Sie den Betreiber an! -Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensupport zu kontaktieren, damit dieser Ihre kostenpflichtige Miete beenden kann. Dazu: +Alternativ: 1. App schließen, -2. auf den Knopf oben am Schloss kurz drücken und schnell loslassen sobald bis dieser zu blinken beginnt, -3. warten, bis das Schloss vollständig geschlossen ist und geschlossen bleibt. +2. auf den Knopf oben am Schloss kurz drücken und sofort loslassen, sobald Knopf zu blinken beginnt, +3. sicherstellen, dass das Schloss vollständig geschlossen ist und geschlossen bleibt. +4. E-Mail an Betreiber schicken (ansonsten läuft Ihre kostenpflichtige Miete weiter!): Problembeschreibung, Rad-ID, Abgabestation. Hinweise hinzugefügt, um das Schließen des Schlosses zu erleichtern, falls dies nicht beim ersten Versuch gelingt. @@ -778,16 +779,16 @@ Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensup Schloss kann erst gefunden werden, wenn reserviertes Rad in der Nähe ist. - Fehler bei Verbinden mit Schloss! + Fehler beim Verbinden mit Schloss! Kommunikationsfehler bei Schlosssuche. - Internet muss erreichbar sein um Verbindung mit Schloss für gemietetes Rad herzustellen. + Internet muss erreichbar sein, um Verbindung mit Schloss für gemietetes Rad herzustellen. Bitte stellen Sie eine Internetverbindung her! - Internet muss erreichbar sein um Verbindung mit Schloss für reserviertes Rad herzustellen. + Internet muss erreichbar sein, um Verbindung mit Schloss für reserviertes Rad herzustellen. Bitte stellen Sie eine Internetverbindung her! Schlossstatus des reservierten Rads konnte nicht ermittelt werden. @@ -796,12 +797,12 @@ Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensup Bitte Bluetooth anschalten, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. - Bitte Standort-Zugriffsfreigabe erteilen, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. + Bitte Standortfreigabe erteilen, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. - Bitte Standortbestimmung aktivieren, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. + Bitte Standortdienste aktivieren, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. Fehlermeldungen verbessert für die Fälle, dass @@ -810,14 +811,14 @@ Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensup - die Standorterkennung deaktiviert ist. - Ihr mobiles Gerät verbindet sich immer noch nicht mit dem Fahrradschloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. + Ihr mobiles Gerät verbindet sich weiterhin nicht mit dem Schloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. Freigabe-Erlaubnisanfragen unter iOS ausführlicher formuliert. Hinweise, um das Verbinden Schlosses zu erleichtern, falls dies nicht beim ersten Versuch gelingt, erweitert. - Die Sitzung ist abgelaufen. Bitte neu anmelden. + Die Sitzung ist abgelaufen. Bitte melden Sie sich erneut an. Auth. abgelaufen @@ -829,17 +830,17 @@ Hinweise, um das Verbinden Schlosses zu erleichtern, falls dies nicht beim erste Abmelden - Persönliche Daten Verwalten + Persönliche Daten verwalten Framework aktualisiert. Activity Indicator zu Konto-Verwaltungsseiten hinzugefügt und Logging erweitert. - Starte Rückgabe... + Starte Miete beenden... - Ist WLAN verfügbar/ Mobilfunknetz vefügbar und mobile Daten aktiviert / ... ? + Ist WLAN/Mobilfunknetz vefügbar und mobile Daten aktiviert? Flyout-Menü Überschift verschönert. @@ -867,7 +868,7 @@ Kleinere Fehlerbehebungen. Protokollierungsstufe - Ausblenden/ Einblenden + Ein-/Ausblenden Ausführliche Fehlermeldungen @@ -904,7 +905,7 @@ Kleinere Fehlerbehebungen. Neues Schloss unterstützt. - Rückmeldung Geben + Rückmeldung geben Rückmeldung zur App @@ -929,7 +930,7 @@ Kleinere Fehlerbehebungen. Verbingungsfehler beim Aufheben der Reservierung! - Verbindungsfehler beim Schlossöffnen! + Verbindungsfehler beim Öffnen des Schlosses! Sende Rückmeldung... @@ -950,13 +951,13 @@ Kleinere Fehlerbehebungen. Rad ist in Ordnung - Bitte Zustand/ Defekt hier beschreiben. + Bitte Zustand/Defekt hier beschreiben. Bei Bedarf bitte hier Rückmeldung eingeben. - Fahrrad erfolgreich zurückgegeben! + Rad erfolgreich zurückgegeben! Aktueller Akkuladestand: @@ -965,10 +966,10 @@ Kleinere Fehlerbehebungen. Für Mein konrad Nutzer: Anzeige des Akkuladestands für E-Bikes und Abfrage des Ladestands nach Radrückgabe. - Die verbleibende Ladung des Fahrradakkus war zuletzt niedrig. Bitte überprüfen Sie diese vor der Fahrt auf dem Fahrraddisplay. Das Rad kann innerhalb 5 Minuten kostenlos zurückgegeben werden. + Die verbleibende Ladung des Fahrradakkus war zuletzt niedrig. Bitte überprüfen Sie diese vor der Fahrt auf dem Fahrraddisplay. Die Miete kann innerhalb 5 Minuten kostenlos abgebrochen werden. - Zur Fahrpause schließen Sie das Fahrradschloss manuell, nicht über die App. Zum Beenden der kostenpflichtigen Miete schieben Sie das Rad in eine zugelassene Station und bestätigen das Mietende in der App; das Schloss schließt automatisch. + Zur Fahrpause schließen Sie das Schloss manuell, nicht über die App. Zum Beenden der kostenpflichtigen Miete schieben Sie das Rad in eine zugelassene Station und bestätigen das Mietende in der App; das Schloss schließt automatisch. Sharee.bike Design verbessert. @@ -977,7 +978,7 @@ Kleinere Fehlerbehebungen. Für Lastenrad Bayern Nutzende: Akkuladestand für E-Bikes wird angezeigt. - Sie werden nun informiert, wenn die Ladung des Fahrradakkus zuletzt als sehr niedrig angegeben wurde. Um die Zuverlässigkeit der Akkustandanzeige in der App zu gewährleisten, geben Sie bitte am Ende Ihrer Fahrt mit einem E-Lastenrad den aktuellen Ladestand in die App ein. + Sie werden nun informiert, wenn die Ladung des Radakkus zuletzt als sehr niedrig angegeben wurde. Um die Zuverlässigkeit der Akkustandanzeige in der App zu gewährleisten, geben Sie bitte am Ende Ihrer Fahrt mit einem E-Lastenrad den aktuellen Ladestand in die App ein. Die App hat ein neues Design! --- Sie sind Beta-Tester? Geben Sie uns jederzeit hilfreiche Rückmeldung über 'Kontakt - Rückmeldung zur App'. Sie sind noch kein Beta-Tester? Werden Sie es und erhalten Sie tolle neue Features vor allen anderen! @@ -1012,7 +1013,7 @@ Außerdem: Kleine Grafiken lassen auf einen Blick erkennen um was für einen Rad Einwilligung - Fahrrad-Nummer hier eingeben + Rad-Nummer hier eingeben Die Lastenräder aus den Vororten zeigen nun ihre Heimatstation im Namen an. Diese Räder müssen dort wieder abgeben werden! @@ -1109,10 +1110,10 @@ Probieren Sie es aus! Zum Aktualisieren ziehen. - Momentan sind keine Fahrräder an dieser Station verfügbar. + Momentan sind keine Räder an dieser Station verfügbar. - Momentan sind keine Fahrräder auf Benutzer {0} reserviert/ gebucht. + Momentan sind keine Räder von Nutzer {0} reserviert/gemietet. Information @@ -1125,7 +1126,8 @@ Probieren Sie es aus! Achtung! Ihre Miete hat bereits begonnen. -Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, dass das Schloss geschlossen ist und geben Sie das Rad zurück. Bitte melden Sie es dem Support! +Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, dass das Schloss geschlossen ist und geben Sie das Rad zurück. +Wichtig: Schicken Sie eine E-Mail an den Betreiber (ansonsten läuft Ihre kostenpflichtige Miete weiter!): Problembeschreibung, Radnummer, Abgabestation. Schloss kann nicht geöffnet werden! @@ -1143,4 +1145,26 @@ Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, das Wenn Sie ein Rad reserviert oder gemietet haben, wird dies Ihnen nun auf der Kartenseite als Symbol angezeigt. Ein Klick darauf führt Sie direkt zur Seite 'Meine Räder'. Wir haben außerdem kleine Designänderungen vorgenommen. + + Beenden der Miete an unbekanntem Standort is nicht möglich. +Fehler beim Start der Standortabfrage! + + + Beenden der Miete an unbekanntem Standort is nicht möglich. +Fehler bei der Standortabfrage! + + + Wir konnten das Rad keiner Station zuordnen. Dazu benötigen wir Ihre Standortinformationen, während Sie direkt neben dem Rad stehen. Nur dann kann Ihre Miete beendet werden! + +Treten Sie an das Rad heran, schalten Sie Bluetooth und Standortdienste ein und versuchen Sie es erneut. + + + Einige Bezeichnungen wurden vereinheitlicht, z.B:<br/> +- was bisher unter 'Rad zurückgeben' lief, heißt nun immer 'Miete beenden'.<br/> +- der 'Betreiber' ist die für die Radflotte zuständige Personengruppe, zu der bei Bedarf Kontakt aufgenommen wird.<br/> +<br/> +Außerdem:<br/> +- Kleinere Fehlerbehebungen<br/> +- Paketaktualisierungen + \ No newline at end of file diff --git a/TINKLib/MultilingualResources/AppResources.resx b/TINKLib/MultilingualResources/AppResources.resx index b35f71f..9e96c30 100644 --- a/TINKLib/MultilingualResources/AppResources.resx +++ b/TINKLib/MultilingualResources/AppResources.resx @@ -127,7 +127,7 @@ Close lock - Close lock & return bike + Close lock & end rental Open lock @@ -142,7 +142,7 @@ Reserve bike - Return bike + End rental Loading Stations and Bikes... @@ -160,29 +160,29 @@ Your mobile device does not connect to the bike lock. Please step as close as possible to the bike and try again. - Returning bike at an unknown location is not possible. -Bike can be returned if + End rental at an unknown location is not possible. +Rental can be ended if - location information is available when closing lock -- bike is in reach and location information is available when pressing button "Return bike" +- bike is in reach and location information is available when pressing button "End rental" - Returning bike at an unknown location is not possible. -Bike can only be returned if bike is in reach and location information is available. + End rental at an unknown location is not possible. +Rental can only be ended if bike is in reach and location information is available. - Returning bike outside of station is not possible. Distance to station {0} is {1} m. + End rental outside of station is not possible. Distance to station {0} is {1} m. - Error returning bike! + Error at ending rental! Attachment could not be created. - Opening mail app failed. + Opening mail app failed. Make sure you have a mail app installed on your mobile device! - Opening phone app failed. + Opening phone app failed. Make sure you have a phone app installed on your mobile device! Legal Information @@ -243,13 +243,13 @@ Bike can only be returned if bike is in reach and location information is avail Session has expired. -Please login to app once again. +Please log in again. Urgent questions? - Are you enjoying the {0}-App? + Are you enjoying the {0}-app? Warning @@ -269,10 +269,10 @@ Please login to app once again. I hereby consent to the transmission of my log file. -The log file contains your app usage data as well as system information. The data will only be used for diagnostic purposes or to improve the app. +The log file contains your app usage data as well as system information. The data will only be used for diagnostic purposes or to improve the app and then deleted. - Does your request/ comment relate to the {0}-app or to a more general subject? + Does your request/comment relate to the {0}-app or to a more general subject? Question @@ -284,7 +284,7 @@ The log file contains your app usage data as well as system information. The dat Centering map... - Loading reserved/ booked bikes... + Loading reserved/rented bikes... Searching locks... @@ -338,7 +338,7 @@ The log file contains your app usage data as well as system information. The dat Password forgotten - Register + Register for free E-mail @@ -357,7 +357,7 @@ The log file contains your app usage data as well as system information. The dat - At least 8 characters + At least eight characters Password @@ -394,7 +394,7 @@ The log file contains your app usage data as well as system information. The dat Lock cannot be closed until bike is near. -Please try again to close bike or report bike to support! +Please try again to close bike or report bike to operator! Lock can not be closed! @@ -406,7 +406,7 @@ Please try again to close bike or report bike to support! Lock reports state "{0}". - Please try to lock again or report bike to support! + Please try to lock again or report bike to operator! {0} @@ -457,7 +457,7 @@ Open sharing dialog? Connection error on updating locking status. - No web error on updating locking status. + Internet must be available for updating lock status. Please establish an Internet connection! <h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4> @@ -501,10 +501,10 @@ Targets Android 11. Error when renting the bike! - A rental of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made. + A rental of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made. - A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made. + A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made. Attention: Lock is closed! @@ -516,16 +516,16 @@ Targets Android 11. {0} - The rental of bike No. {0} has failed. + The rental of bike {0} has failed. - The rental of bike No. {0} has failed, the bike is currently unavailable.{1} + The rental of bike {0} has failed, the bike is currently unavailable. {1} - The reservation of bike no. {0} has failed. + The reservation of bike {0} has failed. - The reservation of bike No. {0} has failed, the bike is currently unavailable.{1} + The reservation of bike {0} has failed, the bike is currently unavailable. {1} Minor fixes. @@ -581,7 +581,7 @@ Please restart app in order to get bike info. €/hour - Rental fees + Rental charges Free use @@ -590,7 +590,7 @@ Please restart app in order to get bike info. hour(s)/day - Max. fee + Max. charges Tariff @@ -633,7 +633,7 @@ Please restart app in order to get bike info. This version of the {0} App is not compatible with server detected. -Please contact the support for help. +Please contact operator for help. Updated for latest server version. @@ -647,7 +647,7 @@ Please contact the support for help. Connection error. Status description: {0}. - Feedback dialog added which is shown after returning bike. + Feedback dialog added which is shown after ending rental. Offline. @@ -681,11 +681,11 @@ Error handling improved. Ensure that no obstacle prevents lock from opening and try again. - The lock could not be opened correctly. Please try again. + The lock could not be opened correctly. Try again! Attention! Your rental has already started. - -If the lock still won't open, make sure the lock is closed and return the bike. Please report it to the support! +If the lock still won't open, make sure the lock is closed and end rental. +Important: Send an email to the operator (otherwise your paid rental will continue!) with: Problem description, bike number, drop-off station. Lock can not be opened! @@ -696,7 +696,7 @@ Error message when opening lock fails improved. Layout of bike names and id display improved. - Hard- and software information send to backend when returning bike. + Hard- and software information send to backend when ending rental. Bugfix: Bike description is displayed correctly again. @@ -741,7 +741,7 @@ Layout of bike names and id display improved. Operator: {0}. - Contact Operator. + Contact operator. Select an answer please. @@ -775,28 +775,28 @@ Minor fixes. Closing the lock and ending the rental is not possible. - Error Start Query Location! + Error start query location! - Error Query Location! + Error query location! - Close lock and return bike {0}? + Close lock and end rental of bike {0}? - Returning bike... + Ending rental... - Return bike {0}? + End rental of bike {0}? Closing lock and returning bike speeded up. - Internet must be available when returning the bike. + Internet must be available when ending rental. Please establish an Internet connection! - Connection error when returning the bike! + Connection error when ending rental. Third-party components updated. @@ -838,7 +838,7 @@ Display of status information extended. Bugfix: Sending support mails works again. - An error occurred switching from cargo bikes/ city bikes. + An error occurred switching between cargo and city bikes. {0} @@ -863,12 +863,13 @@ Bugfix: Sending support mails works again. Error when connecting with lock! - Unfortunately, it is still not possible to establish a connection between your mobile device and the bike lock. Please contact customer support. + It is still not possible to establish a connection between your mobile device and the bike lock. Please contact operator! -As a last resort, please close the lock by hand AND contact customer support so that they can terminate your chargeable rental. To do this: -1. close the app, -2. press the button at the top of the lock briefly and quickly release it as soon as it starts flashing, -3. wait until the lock is completely closed and remains closed. +Alternative: +1. close app, +2. press the button at the top of the lock briefly and release it as soon as it starts flashing, +3. make sure that the lock is completely closed and remains closed. +4. send e-mail to operator (otherwise your chargeable rental will continue!): Problem description, Drop-off station. Hints added to ease closing of lock in case closing does not succeed on first try. @@ -892,10 +893,10 @@ As a last resort, please close the lock by hand AND contact customer support so Communication error during lock search. - Internet must be reachable to connect to lock of rented bike. + Internet must be reachable to connect to lock of rented bike. Please establish an Internet connection! - Internet must be reachable to connect to lock of reserved bike. + Internet must be reachable to connect to lock of reserved bike. Please establish an Internet connection! Lock status of the reserved bike could not be determined. @@ -907,7 +908,7 @@ As a last resort, please close the lock by hand AND contact customer support so Please grant location permissions, otherwise lock cannot be connected. - Please turn Location on, otherwise lock cannot be connected. + Please turn location services on, otherwise lock cannot be connected. Errormessages improved for szenarios when @@ -942,10 +943,10 @@ Hints to ease connecting to lock in case connecting does not succeed on first tr Activity indicator added account management pages and logging extended. - Starting bike return... + Starting end rental... - Is WIFI available/ mobile network available and mobile data activated / ... ? + Is WIFI/mobile network available and mobile data activated? Flyout menu header improved. @@ -972,7 +973,7 @@ Minor bugfixes. Logging level - Show/ hide + Show/hide Verbose error messages @@ -1009,13 +1010,13 @@ Minor bugfixes. Support for new lock type added. - Give Feedback + Give feedback - Feedback about the App + Feedback about the app - {0}-App Releated Request + {0}-app releated request Subject of contact mail to ("Feedback about the app"). @@ -1061,7 +1062,7 @@ Minor bugfixes. Please enter feedback here if needed. - Bike successfully returned! + Rental successfully ended! Current battery level: @@ -1070,7 +1071,7 @@ Minor bugfixes. For Mein konrad users: Battery charging level is displayed for ebikes and is queried after return of bike. - The remaining power of the bike battery was low recently. Please check it on the bike display before riding. The bike can be returned within 5 minutes free of charge. + The remaining power of the bike battery was low recently. Please check it on the bike display before riding. The rental can be canceled within 5 minutes free of charge. At pausing ride, you close the bike lock manually, not via the app. To end the chargeable rental, slide the bike into an authorized station and confirm the end of the rental in the app; the lock closes automatically. @@ -1215,7 +1216,7 @@ Try it out! There are currently no bicycles available at this station. - There are currently no bicycles reserved/booked on user {0}. + There are currently no bikes reserved/rented by user {0}. Information @@ -1228,9 +1229,31 @@ Try it out! Minor improvements. - Oops, there is no internet connection. + Oops, there is no Internet connection. If you have reserved or rented a bike, this will now be shown to you as an icon on the map page. Clicking on it will take you directly to the 'My bikes' page. We have also made small design changes. + + End rental at an unknown location is not possible. +Start getting geolocation failed. + + + End rental at an unknown location is not possible. +Getting geolocation failed. + + + We could not assign the bike to any station. For this we need your location information while you are standing right next to the bike. Only then your rental can be terminated! + +Approach the bike, turn on Bluetooth and Location services and try again. + + + Some terms have been standardized, e.g:<br/> +- what used to be called 'return bike' is now always called 'end rental'.<br/> +- The 'operator' is the group of people responsible for the bike fleet, who will be contacted if necessary.<br/> +<br/> +Also:<br/> +- Minor bug fixes<br/> +- Package updates + \ No newline at end of file diff --git a/TINKLib/MultilingualResources/TINKLib.de.xlf b/TINKLib/MultilingualResources/TINKLib.de.xlf index 25ce770..0a1615a 100644 --- a/TINKLib/MultilingualResources/TINKLib.de.xlf +++ b/TINKLib/MultilingualResources/TINKLib.de.xlf @@ -19,8 +19,9 @@ Schloss schließen - Close lock & return bike - Schloss schließen & Miete beenden + Close lock & end rental + Schloss schließen & Miete beenden + Please verify the translation’s accuracy as the source string was updated after it was translated. Open lock @@ -39,8 +40,9 @@ Rad reservieren - Return bike - Miete beenden + End rental + Miete beenden + Please verify the translation’s accuracy as the source string was updated after it was translated. Bike Locations @@ -48,7 +50,7 @@ User {0} successfully logged in. - Benutzer {0} erfolgreich angemeldet. + Nutzer {0} erfolgreich angemeldet. Welcome! @@ -68,15 +70,15 @@ No user logged in. - Kein Benutzer angemeldet. + Kein Nutzer angemeldet. This version of the {0} App is outdated. Please update to the latest version. Diese Version der {0} App ist veraltet. Bitte auf aktuelle Version aktualisieren. - Does your request/ comment relate to the {0}-app or to a more general subject? - Betrifft die Anfrage/ Anmerkung die {0}-App oder ein allgemeines Thema? + Does your request/comment relate to the {0}-app or to a more general subject? + Betrifft die Anfrage/Anmerkung die {0}-App oder ein allgemeines Thema? {0} app request @@ -124,7 +126,7 @@ Lock is blocked. Please ensure that no spoke or any other obstacle prevents the lock from closing and try again. - Schloss ist blockiert. Bitte sicherstellen, dass keine Speiche oder ein anderer Gegenstand das Schloss blockiert und Vorgang wiederholen. + Schloss ist blockiert. Bitte stellen Sie sicher, dass keine Speiche oder ein anderer Gegenstand das Schloss blockiert und wiederholen Sie den Vorgang. Lock can only be closed if bike is not moving. Please park bike and try again. @@ -132,19 +134,19 @@ Your mobile device does not connect to the bike lock. Please step as close as possible to the bike and try again. - Ihr mobiles Gerät verbindet sich nicht mit dem Fahrradschloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. + Ihr mobiles Gerät verbindet sich nicht mit dem Schloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. Your mobile device does not connect to the bike lock. Please step as close as possible to the bike and try again. - Ihr mobiles Gerät verbindet sich nicht mit dem Fahrradschloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. + Ihr mobiles Gerät verbindet sich nicht mit dem Schloss. Bitte treten Sie möglichst nah an das Rad heran und probieren Sie es erneut. Loading bikes located at station... Lade Räder an Station... - Loading reserved/ booked bikes... - Lade meine Räder... + Loading reserved/rented bikes... + Lade reservierte/gemietete Räder... Searching locks... @@ -159,40 +161,40 @@ Lade Stationen und Räder... - Returning bike outside of station is not possible. Distance to station {0} is {1} m. - Rückgabe ausserhalb von Station nicht möglich. Entfernung zur Station {0} ist {1} m. + End rental outside of station is not possible. Distance to station {0} is {1} m. + Rückgabe außerhalb einer Station nicht möglich. Entfernung zur nächsten Station {0} beträgt {1} m. - Error returning bike! - Fehler bei Radrückgabe! + Error at ending rental! + Fehler beim Beenden der Miete! - Returning bike at an unknown location is not possible. -Bike can be returned if + End rental at an unknown location is not possible. +Rental can be ended if - location information is available when closing lock -- bike is in reach and location information is available when pressing button "Return bike" - Fahrradrückgabe an unbekanntem Standort nicht möglich. -Eine Radrückgabe ist möglich, wenn -- beim Schliessen des Schlosses Standortinformation verfügbar ist -- beim Drücken von "Rad zurückgeben" das Rad in Reichweite ist und Standortinformation verfügbar ist. +- bike is in reach and location information is available when pressing button "End rental" + Beenden der Miete an unbekanntem Standort nicht möglich. +Ein Mietende ist möglich, wenn +- beim Schließen des Schlosses Standortinformation verfügbar ist +- beim Drücken von "Miete beenden" das Rad in Reichweite ist und Standortinformation verfügbar ist - Returning bike at an unknown location is not possible. -Bike can only be returned if bike is in reach and location information is available. - Fahrradrückgabe an unbekanntem Standort nicht möglich. -Eine Radrückgabe ist nur möglich, wenn das Rad in Reichweite ist und Standortinformation verfügbar ist. + End rental at an unknown location is not possible. +Rental can only be ended if bike is in reach and location information is available. + Beenden der Miete an unbekanntem Standort nicht möglich. +Mietende ist nur möglich, wenn das Rad in Reichweite ist und Standortinformation verfügbar ist. Attachment could not be created. - Mailanhang konnte nich erzeugt werden. + Anhang konnte nich erzeugt werden. - Opening mail app failed. - Mailapp konnte nicht geöffnet werden. + Opening mail app failed. Make sure you have a mail app installed on your mobile device! + Mailapp konnte nicht geöffnet werden. Stellen Sie sicher, dass auf Ihrem mobilen Gerät eine Mailapp installiert und eingerichtet ist! - Opening phone app failed. - Telefonapp konnte nicht geöffnet werden. + Opening phone app failed. Make sure you have a phone app installed on your mobile device! + Telefonapp konnte nicht geöffnet werden. Stellen Sie sicher, dass auf Ihrem mobilen Gerät eine Telefonapp installiert ist! OK @@ -203,8 +205,8 @@ Eine Radrückgabe ist nur möglich, wenn das Rad in Reichweite ist und Standorti Fragen? Hinweise? - Are you enjoying the {0}-App? - Gefällt die {0}-App? + Are you enjoying the {0}-app? + Gefällt Ihnen die {0}-App? Warning @@ -221,10 +223,10 @@ Eine Radrückgabe ist nur möglich, wenn das Rad in Reichweite ist und Standorti I hereby consent to the transmission of my log file. -The log file contains your app usage data as well as system information. The data will only be used for diagnostic purposes or to improve the app. +The log file contains your app usage data as well as system information. The data will only be used for diagnostic purposes or to improve the app and then deleted. Hiermit stimme ich der Übermittlung meiner Protokolldatei zu. -Die Protokolldatei enthält Ihre App-Nutzungsdaten sowie Systeminformationen. Die Daten werden ausschließlich für Diagnosezwecke bzw. Verbesserung der App verwendet. +Die Protokolldatei enthält Ihre App-Nutzungsdaten sowie Systeminformationen. Die Daten werden ausschließlich für Diagnosezwecke bzw. Verbesserung der App verwendet und werden anschließend gelöscht. Question @@ -232,9 +234,9 @@ Die Protokolldatei enthält Ihre App-Nutzungsdaten sowie Systeminformationen. Di Session has expired. -Please login to app once again. +Please log in again. Sitzung ist abgelaufen. -Bitte erneut in App anmelden. +Bitte melden Sie sich erneut an. Code {0}, max. reservation time of {1} min. expired. @@ -273,7 +275,7 @@ Bitte erneut in App anmelden. Available. - Frei. + Verfügbar. Code {0}, location {1}, rented since {2}. @@ -304,8 +306,9 @@ Bitte erneut in App anmelden. Passwort vergessen - Register - Registrieren + Register for free + Kostenlos registrieren + Please verify the translation’s accuracy as the source string was updated after it was translated. E-mail @@ -316,8 +319,8 @@ Bitte erneut in App anmelden. E-Mail - At least 8 characters - Mindestens 8 Zeichen + At least eight characters + Mindestens acht Zeichen Password @@ -354,11 +357,11 @@ Bitte erneut in App anmelden. Please connect to Internet to recover the password. - Bitte mit dem Internet verbinden zum Wiederherstellen des Passworts. + Zur Wiederherstellung des Passworts bitte mit dem Internet verbinden. Please connect to Internet to register. - Bitte mit dem Internet verbinden zum Registrieren. + Zur Registrierung bitte mit dem Internet verbinden. Hint @@ -366,7 +369,7 @@ Bitte erneut in App anmelden. After try to open lock state closed is reported. - Nach Versuch Schloss zu öffnen wird Status geschlossen zurückgemeldet. + Nach Versuch das Schloss zu öffnen, wird Status "geschlossen" zurückgemeldet. Lock cannot be opened until bike is near. @@ -374,13 +377,13 @@ Bitte erneut in App anmelden. Lock cannot be closed until bike is near. - Schloss kann erst geschlossen werden, wenn das Rad in der Nähe ist. + Schloss kann erst geschlossen werden, wenn Rad in der Nähe ist. Lock cannot be closed until bike is near. -Please try again to close bike or report bike to support! - Schloss kann erst geschlossen werden, wenn das Rad in der Nähe ist. -Bitte Schließen nochmals versuchen oder Rad dem Support melden! +Please try again to close bike or report bike to operator! + Schloss kann erst geschlossen werden, wenn Rad in der Nähe ist. +Bitte Schließen nochmals versuchen oder Rad dem Betreiber melden! Lock can not be closed! @@ -388,26 +391,26 @@ Bitte Schließen nochmals versuchen oder Rad dem Support melden! After try to close lock state open is reported. - Nach Versuch Schloss zu schließen wird Status geöffnet zurückgemeldet. + Nach Versuch Schloss zu schließen, wird Status "offen" zurückgemeldet. Lock reports state "{0}". Schloss meldet Status "{0}". - Please try to lock again or report bike to support! + Please try to lock again or report bike to operator! {0} - Bitte schließen nochmals versuchen oder Rad dem Support melden! + Bitte Schließen nochmals versuchen oder Rad dem Betreiber melden! {0} Please allow location sharing so that bike lock/locks can be managed. - Bitte Standortfreigabe erlauben, damit Fahrradschloss/ Schlösser verwaltet werden können. + Bitte Standortfreigabe erlauben, damit Schloss/-schlösser verwaltet werden können. Please allow location sharing so that bike lock/locks can be managed. Open sharing dialog? - Bitte Standortfreigabe erlauben, damit Fahrradschloss/ Schlösser verwaltet werden können. + Bitte Standortfreigabe erlauben, damit Radschloss/-schlösser verwaltet werden können. Freigabedialog öffen? @@ -418,7 +421,7 @@ Freigabedialog öffen? Please activate location so that bike lock can be found! - Bitte Standort aktivieren, damit Fahrradschloss gefunden werden kann! + Bitte Standort aktivieren, damit Schloss gefunden werden kann! No @@ -430,7 +433,7 @@ Freigabedialog öffen? Please enable Bluetooth to manage bike lock/locks. - Bitte Bluetooth aktivieren, damit Fahrradschloss/ Schlösser verwaltet werden können. + Bitte Bluetooth aktivieren, damit Schloss/-schlösser verwaltet werden können. Search lock @@ -442,11 +445,11 @@ Freigabedialog öffen? <h4><b>Lock is opening.<br/>Please wait until it is completely open.</b></h4> - <h4><b>Schloss öffnet.<br/>Bitte warten Sie bis es komplett geöffnet ist.</b></h4> + <h4><b>Schloss öffnet.<br/>Bitte warten Sie, bis es komplett geöffnet ist.</b></h4> Updating... - Starte Aktualisierung... + Aktualisiere... Updating lock state... @@ -454,23 +457,23 @@ Freigabedialog öffen? Reading charging level... - Lese Akkustatus... + Lese Akkustand... Status error on updating lock state. - Statusfehler beim Aktualisieren des Schlossstatusses. + Statusfehler beim Aktualisieren des Schlossstatus. Connection error on updating locking status. - Verbingungsfehler beim Aktualisieren des Schlossstatusses. + Verbingungsfehler beim Aktualisieren des Schlossstatus. - No web error on updating locking status. - Kein Netz beim Aktualisieren des Schlossstatusses. + Internet must be available for updating lock status. Please establish an Internet connection! + Um den Schlossstatus zu aktualisieren, wird Internet benötigt. Bitte stellen Sie eine Internetverbindung her! <h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4> - <h4><b>Schloss schließt.<br/>Bitte warten Sie bis es komplett geschlossen ist.</b></h4> + <h4><b>Schloss schließt.<br/>Bitte warten Sie, bis es komplett geschlossen ist.</b></h4> Updated to latest lock firmware. @@ -502,11 +505,11 @@ Zielplatform Android 11. Battery status cannot be read. - Akkustatus kann nicht gelesen werden. + Akkustand kann nicht gelesen werden. Battery status can only be read when bike is nearby. - Akkustatus kann erst gelesen werden, wenn Rad in der Nähe ist. + Akkuladestand kann erst gelesen werden, wenn Rad in der Nähe ist. Renting bike... @@ -521,12 +524,12 @@ Zielplatform Android 11. Fehler beim Mieten des Rads! - A rental of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made. - Eine Miete des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/ Buchungen bereits getätigt wurden. + A rental of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made. + Eine Miete des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/Mieten bereits getätigt wurden. - A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made. - Eine Reservierung des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/ Buchungen bereits getätigt wurden. + A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made. + Eine Reservierung des Rads {0} wurde abgelehnt, weil die maximal erlaubte Anzahl von {1} Reservierungen/Mieten bereits getätigt wurden. Attention: Lock is closed! @@ -543,20 +546,20 @@ Zielplatform Android 11. {0} - The rental of bike No. {0} has failed. - Die Miete des Fahrads Nr. {0} ist fehlgeschlagen. + The rental of bike {0} has failed. + Die Miete des Rads {0} ist fehlgeschlagen. - The rental of bike No. {0} has failed, the bike is currently unavailable.{1} - Die Miete des Rads Nr. {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} + The rental of bike {0} has failed, the bike is currently unavailable. {1} + Die Miete des Rads {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} - The reservation of bike no. {0} has failed. - Die Reservierung des Fahrads Nr. {0} ist fehlgeschlagen. + The reservation of bike {0} has failed. + Die Reservierung des Rads {0} ist fehlgeschlagen. - The reservation of bike No. {0} has failed, the bike is currently unavailable.{1} - Die Reservierung des Rads Nr. {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} + The reservation of bike {0} has failed, the bike is currently unavailable. {1} + Die Reservierung des Rads {0} ist fehlgeschlagen, das Rad ist momentan nicht erreichbar.{1} Minor fixes. @@ -575,8 +578,8 @@ Zielplatform Android 11. Bike should always be disconnected when not reserved or rented. Please restart app in order to get bike info. Ungülitiger Status von Rad {0} erkannt. -Ein nicht reserviertes oder gemietetes Rad sollte immer getrennt sein . -Bitte App neu starten um Rad Infos zu bekommen. +Ein nicht reserviertes oder gemietetes Rad sollte immer getrennt sein. +Bitte App neu starten, um Radinfos zu bekommen. Unknown status for bike {0} detected. @@ -590,7 +593,7 @@ Bitte App neu starten um Rad Infos zu bekommen. Cancel reservation for bike {0}? - Reservierung für Fahrrad {0} aufheben? + Reservierung für Rad {0} aufheben? Minor fix: Bikes are disconnected as soon as becoming disposable. @@ -598,7 +601,7 @@ Bitte App neu starten um Rad Infos zu bekommen. Reserve bike {0} free of charge for {1} min? - Fahrrad {0} kostenlos für {1} Min. reservieren? + Rad {0} kostenlos für {1} Min. reservieren? Connection error: Deserialization failed. @@ -625,16 +628,17 @@ Bitte App neu starten um Rad Infos zu bekommen. Abo-Preis - Rental fees - Mietgebühren + Rental charges + Mietkosten Free use Gratis Nutzung - Max. fee - Max. Gebühr + Max. charges + Max. Gebühr + Please verify the translation’s accuracy as the source string was updated after it was translated. €/hour @@ -698,9 +702,9 @@ Bitte App neu starten um Rad Infos zu bekommen. This version of the {0} App is not compatible with server detected. -Please contact the support for help. +Please contact operator for help. Diese Version der {0} App ist nicht kompatibel mit dem erkannten Server. -Bitte kontaktieren sie den Support! +Bitte kontaktieren sie den Betreiber! Updated for latest server version. @@ -721,11 +725,12 @@ Bitte kontaktieren sie den Support! Connection error. Status code: {0}. - Verbindungsfehler. Status statucode: {0}. + Verbindungsfehler. Statuscode: {0}. - Feedback dialog added which is shown after returning bike. - Seite zur Eingabe von Rückmeldungen hinzugefügt, der nach Rückgabe eines Rads angezeigt wird. + Feedback dialog added which is shown after ending rental. + Seite zur Eingabe von Rückmeldungen hinzugefügt, der nach Rückgabe eines Rads angezeigt wird. + Please verify the translation’s accuracy as the source string was updated after it was translated. Offline. @@ -733,7 +738,7 @@ Bitte kontaktieren sie den Support! Cache used. - Cache Daten. + Cache genutzt. Your feedback could not be send to server successfully. @@ -767,7 +772,7 @@ Fehlerhandling verbessert. Error while opening lock! - Fehler beim Schloss Öffnen! + Fehler beim Öffnen des Schlosses! Stations names instead descriptions shown on page title. @@ -778,8 +783,9 @@ Fehlermeldung beim Öffnen von Schloss verbessert. Layout Anzeige Radnamen und nummern verbessert. - Hard- and software information send to backend when returning bike. - Hard- und software information werden an Backend übermittelt bei Radrückgabe. + Hard- and software information send to backend when ending rental. + Hard- und software information werden an Backend übermittelt bei Radrückgabe. + Please verify the translation’s accuracy as the source string was updated after it was translated. Bugfix: Bike description is displayed correctly again. @@ -807,7 +813,7 @@ Layout Anzeige Radnamen und nummern verbessert. Please login to reserve bikes! Tap <font color="blue"><u>here</u></font> to switch to login page. - Bitte Anmelden um Fahrräder zu reservieren! <font color="blue"><u>Hier</u></font> tippen, um auf Anmeldeseite zu wechseln. + Bitte Anmelden, um Räder zu reservieren! <font color="blue"><u>Hier</u></font> tippen, um auf Anmeldeseite zu wechseln. Contact operator? @@ -819,7 +825,7 @@ Layout Anzeige Radnamen und nummern verbessert. Select Station - Station Auswählen + Station auswählen Select station @@ -842,8 +848,8 @@ Layout Anzeige Radnamen und nummern verbessert. Betreiber: {0}. - Contact Operator. - Betreiber Kontaktieren. + Contact operator. + Betreiber kontaktieren. Select an answer please. @@ -868,16 +874,18 @@ Kleinere Verbesserungen. Abfrage Standort... - Error Query Location! - Fehler bei Standortabfrage! + Error query location! + Fehler bei Standortabfrage! + Please verify the translation’s accuracy as the source string was updated after it was translated. Closing the lock and ending the rental is not possible. Schloss schließen und Miete beenden ist nicht möglich. - Error Start Query Location! - Fehler beim Start der Standortabfrage! + Error start query location! + Fehler beim Start der Standortabfrage! + Please verify the translation’s accuracy as the source string was updated after it was translated. No location info available. Activate your device's location services. @@ -896,29 +904,29 @@ Kleinere Verbesserungen. Start Standortabfrage... - Close lock and return bike {0}? - Fahrrad {0} abschließen und zurückgeben? + Close lock and end rental of bike {0}? + Rad {0} abschließen und Miete beenden? - Return bike {0}? - Fahrrad {0} zurückgeben? + End rental of bike {0}? + Miete von Rad {0} beenden? - Returning bike... - Gebe Rad zurück... + Ending rental... + Beende Miete... Rent bike {0} and open lock? - Fahrrad {0} mieten und Schloss öffnen? + Rad {0} mieten und Schloss öffnen? - Internet must be available when returning the bike. - Internet muss erreichbar sein beim Zurückgeben des Rads. + Internet must be available when ending rental. Please establish an Internet connection! + Um die Miete zu beenden, wird Internet benötigt. Bitte stellen Sie eine Internetverbindung her! - Connection error when returning the bike! - Verbingungsfehler beim Zurückgeben des Rads! + Connection error when ending rental. + Verbingungsfehler beim Beenden der Miete! Closing lock and returning bike speeded up. @@ -981,18 +989,18 @@ Anzeige von Statusinformationen erweitert. Fehlerbehebung: Supportmails können wieder verschickt werden. - An error occurred switching from cargo bikes/ city bikes. + An error occurred switching between cargo and city bikes. {0} - Beim Umschalten zwischen Lasten-/ Stadträdern ist ein Fehler aufgetreten. + Beim Umschalten zwischen Lasten- und Stadträdern ist ein Fehler aufgetreten. {0} No bike with id {0} found. - Kein Fahrrad mit Id {0} gefunden. + Kein Rad mit ID {0} gefunden. Error Selecting Bike! - Fehler beim Rad Wählen! + Fehler beim Auswählen des Rads! Bugfix: No more closing of app on Select Bike page. @@ -1000,7 +1008,7 @@ Fehlerbehebung: Supportmails können wieder verschickt werden. Your mobile device still does not connect to the bike lock. Please restart the app or even your mobile device and repeat the process. - Ihr mobiles Gerät verbindet sich immer noch nicht mit dem Fahrradschloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. + Ihr mobiles Gerät verbindet sich immer noch nicht mit dem Schloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. Cancel @@ -1015,18 +1023,20 @@ Fehlerbehebung: Supportmails können wieder verschickt werden. Fehler beim Verbinden mit Schloss! - Unfortunately, it is still not possible to establish a connection between your mobile device and the bike lock. Please contact customer support. + It is still not possible to establish a connection between your mobile device and the bike lock. Please contact operator! -As a last resort, please close the lock by hand AND contact customer support so that they can terminate your chargeable rental. To do this: -1. close the app, -2. press the button at the top of the lock briefly and quickly release it as soon as it starts flashing, -3. wait until the lock is completely closed and remains closed. - Es kann leider weiterhin keine Verbindung zwischen Ihrem mobilen Gerät und dem Fahrradschloss aufgebaut werden. Bitte kontaktieren Sie den Kundensupport. +Alternative: +1. close app, +2. press the button at the top of the lock briefly and release it as soon as it starts flashing, +3. make sure that the lock is completely closed and remains closed. +4. send e-mail to operator (otherwise your chargeable rental will continue!): Problem description, Drop-off station. + Es kann weiterhin keine Verbindung zwischen Ihrem mobilen Gerät und dem Schloss aufgebaut werden. Rufen Sie den Betreiber an! -Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensupport zu kontaktieren, damit dieser Ihre kostenpflichtige Miete beenden kann. Dazu: +Alternativ: 1. App schließen, -2. auf den Knopf oben am Schloss kurz drücken und schnell loslassen sobald bis dieser zu blinken beginnt, -3. warten, bis das Schloss vollständig geschlossen ist und geschlossen bleibt. +2. auf den Knopf oben am Schloss kurz drücken und sofort loslassen, sobald Knopf zu blinken beginnt, +3. sicherstellen, dass das Schloss vollständig geschlossen ist und geschlossen bleibt. +4. E-Mail an Betreiber schicken (ansonsten läuft Ihre kostenpflichtige Miete weiter!): Problembeschreibung, Rad-ID, Abgabestation. Hints added to ease closing of lock in case closing does not succeed on first try. @@ -1050,19 +1060,19 @@ Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensup Error when connecting to lock! - Fehler bei Verbinden mit Schloss! + Fehler beim Verbinden mit Schloss! Communication error during lock search. Kommunikationsfehler bei Schlosssuche. - Internet must be reachable to connect to lock of rented bike. - Internet muss erreichbar sein um Verbindung mit Schloss für gemietetes Rad herzustellen. + Internet must be reachable to connect to lock of rented bike. Please establish an Internet connection! + Internet muss erreichbar sein, um Verbindung mit Schloss für gemietetes Rad herzustellen. Bitte stellen Sie eine Internetverbindung her! - Internet must be reachable to connect to lock of reserved bike. - Internet muss erreichbar sein um Verbindung mit Schloss für reserviertes Rad herzustellen. + Internet must be reachable to connect to lock of reserved bike. Please establish an Internet connection! + Internet muss erreichbar sein, um Verbindung mit Schloss für reserviertes Rad herzustellen. Bitte stellen Sie eine Internetverbindung her! Lock status of the reserved bike could not be determined. @@ -1074,13 +1084,13 @@ Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensup Please grant location permissions, otherwise lock cannot be connected. - Bitte Standort-Zugriffsfreigabe erteilen, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. + Bitte Standortfreigabe erteilen, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. - Please turn Location on, otherwise lock cannot be connected. - Bitte Standortbestimmung aktivieren, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. + Please turn location services on, otherwise lock cannot be connected. + Bitte Standortdienste aktivieren, anderenfalls ist eine Verbindung mit dem Schloss nicht möglich. Errormessages improved for szenarios when @@ -1094,7 +1104,7 @@ Als aller letzten Ausweg das Schloss bitte per Hand schließen UND den Kundensup Your mobile device still does not connect to the bike lock. Please restart the app or even your mobile device and repeat the process. - Ihr mobiles Gerät verbindet sich immer noch nicht mit dem Fahrradschloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. + Ihr mobiles Gerät verbindet sich weiterhin nicht mit dem Schloss. Bitte starten Sie die App oder sogar Ihr mobiles Gerät neu und wiederholen Sie den Vorgang. Permission requests messages on iOS formulated in more detail. @@ -1104,7 +1114,7 @@ Hinweise, um das Verbinden Schlosses zu erleichtern, falls dies nicht beim erste The session has expired. Please register again. - Die Sitzung ist abgelaufen. Bitte neu anmelden. + Die Sitzung ist abgelaufen. Bitte melden Sie sich erneut an. Auth. expired @@ -1120,7 +1130,7 @@ Hinweise, um das Verbinden Schlosses zu erleichtern, falls dies nicht beim erste Manage personal data - Persönliche Daten Verwalten + Persönliche Daten verwalten Framework updated. @@ -1129,12 +1139,12 @@ Activity indicator added account management pages and logging extended. Activity Indicator zu Konto-Verwaltungsseiten hinzugefügt und Logging erweitert. - Starting bike return... - Starte Rückgabe... + Starting end rental... + Starte Miete beenden... - Is WIFI available/ mobile network available and mobile data activated / ... ? - Ist WLAN verfügbar/ Mobilfunknetz vefügbar und mobile Daten aktiviert / ... ? + Is WIFI/mobile network available and mobile data activated? + Ist WLAN/Mobilfunknetz vefügbar und mobile Daten aktiviert? Flyout menu header improved. @@ -1172,8 +1182,8 @@ Kleinere Fehlerbehebungen. Protokollierungsstufe - Show/ hide - Ausblenden/ Einblenden + Show/hide + Ein-/Ausblenden Verbose error messages @@ -1224,17 +1234,19 @@ Kleinere Fehlerbehebungen. Neues Schloss unterstützt. - Give Feedback - Rückmeldung Geben + Give feedback + Rückmeldung geben - Feedback about the App - Rückmeldung zur App + Feedback about the app + Rückmeldung zur App + Please verify the translation’s accuracy as the source string was updated after it was translated. - {0}-App Releated Request - {0}-App Anfrage + {0}-app releated request + {0}-App Anfrage Subject of contact mail to ("Feedback about the app"). + Please verify the translation’s accuracy as the source string was updated after it was translated. Connection error when reserving the bike! @@ -1258,7 +1270,7 @@ Kleinere Fehlerbehebungen. Connection error when opening the lock! - Verbindungsfehler beim Schlossöffnen! + Verbindungsfehler beim Öffnen des Schlosses! Submitting feedback... @@ -1286,15 +1298,15 @@ Kleinere Fehlerbehebungen. Please describe condition/defect here. - Bitte Zustand/ Defekt hier beschreiben. + Bitte Zustand/Defekt hier beschreiben. Please enter feedback here if needed. Bei Bedarf bitte hier Rückmeldung eingeben. - Bike successfully returned! - Fahrrad erfolgreich zurückgegeben! + Rental successfully ended! + Rad erfolgreich zurückgegeben! Current battery level: @@ -1305,12 +1317,12 @@ Kleinere Fehlerbehebungen. Für Mein konrad Nutzer: Anzeige des Akkuladestands für E-Bikes und Abfrage des Ladestands nach Radrückgabe. - The remaining power of the bike battery was low recently. Please check it on the bike display before riding. The bike can be returned within 5 minutes free of charge. - Die verbleibende Ladung des Fahrradakkus war zuletzt niedrig. Bitte überprüfen Sie diese vor der Fahrt auf dem Fahrraddisplay. Das Rad kann innerhalb 5 Minuten kostenlos zurückgegeben werden. + The remaining power of the bike battery was low recently. Please check it on the bike display before riding. The rental can be canceled within 5 minutes free of charge. + Die verbleibende Ladung des Fahrradakkus war zuletzt niedrig. Bitte überprüfen Sie diese vor der Fahrt auf dem Fahrraddisplay. Die Miete kann innerhalb 5 Minuten kostenlos abgebrochen werden. At pausing ride, you close the bike lock manually, not via the app. To end the chargeable rental, slide the bike into an authorized station and confirm the end of the rental in the app; the lock closes automatically. - Zur Fahrpause schließen Sie das Fahrradschloss manuell, nicht über die App. Zum Beenden der kostenpflichtigen Miete schieben Sie das Rad in eine zugelassene Station und bestätigen das Mietende in der App; das Schloss schließt automatisch. + Zur Fahrpause schließen Sie das Schloss manuell, nicht über die App. Zum Beenden der kostenpflichtigen Miete schieben Sie das Rad in eine zugelassene Station und bestätigen das Mietende in der App; das Schloss schließt automatisch. Sharee.bike design improved. @@ -1322,7 +1334,7 @@ Kleinere Fehlerbehebungen. You will now be informed if the charge of the bike battery was last indicated as very low. To ensure the reliability of the battery level indicator in the app, please enter the current charge level in the app at the end of your ride with an e-bike. - Sie werden nun informiert, wenn die Ladung des Fahrradakkus zuletzt als sehr niedrig angegeben wurde. Um die Zuverlässigkeit der Akkustandanzeige in der App zu gewährleisten, geben Sie bitte am Ende Ihrer Fahrt mit einem E-Lastenrad den aktuellen Ladestand in die App ein. + Sie werden nun informiert, wenn die Ladung des Radakkus zuletzt als sehr niedrig angegeben wurde. Um die Zuverlässigkeit der Akkustandanzeige in der App zu gewährleisten, geben Sie bitte am Ende Ihrer Fahrt mit einem E-Lastenrad den aktuellen Ladestand in die App ein. The app has a new design! --- You are a beta tester? Give us helpful feedback anytime via ‘Contact - Feedback about the App’. Not a beta tester yet? Become one and get great new features before anyone else! @@ -1374,7 +1386,7 @@ Außerdem: Kleine Grafiken lassen auf einen Blick erkennen um was für einen Rad Enter bike number here - Fahrrad-Nummer hier eingeben + Rad-Nummer hier eingeben The cargo bikes from the suburbs now show their home station in their name. These bikes must be returned there! @@ -1518,11 +1530,11 @@ Probieren Sie es aus! There are currently no bicycles available at this station. - Momentan sind keine Fahrräder an dieser Station verfügbar. + Momentan sind keine Räder an dieser Station verfügbar. - There are currently no bicycles reserved/booked on user {0}. - Momentan sind keine Fahrräder auf Benutzer {0} reserviert/ gebucht. + There are currently no bikes reserved/rented by user {0}. + Momentan sind keine Räder von Nutzer {0} reserviert/gemietet. Information @@ -1533,16 +1545,17 @@ Probieren Sie es aus! Kleine Verbesserungen. - The lock could not be opened correctly. Please try again. + The lock could not be opened correctly. Try again! Attention! Your rental has already started. - -If the lock still won't open, make sure the lock is closed and return the bike. Please report it to the support! +If the lock still won't open, make sure the lock is closed and end rental. +Important: Send an email to the operator (otherwise your paid rental will continue!) with: Problem description, bike number, drop-off station. Das Schloss konnte nicht korrekt geöffnet werden. Bitte versuchen Sie es erneut. Achtung! Ihre Miete hat bereits begonnen. -Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, dass das Schloss geschlossen ist und geben Sie das Rad zurück. Bitte melden Sie es dem Support! +Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, dass das Schloss geschlossen ist und geben Sie das Rad zurück. +Wichtig: Schicken Sie eine E-Mail an den Betreiber (ansonsten läuft Ihre kostenpflichtige Miete weiter!): Problembeschreibung, Radnummer, Abgabestation. Lock can not be opened! @@ -1553,8 +1566,9 @@ Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, das Stellen Sie sicher, dass kein Hindernis das Öffnen des Schlosses verhindert und versuchen Sie es erneut. - Oops, there is no internet connection. - Ups, es ist keine Internetverbindung vorhanden. + Oops, there is no Internet connection. + Ups, es ist keine Internetverbindung vorhanden. + Please verify the translation’s accuracy as the source string was updated after it was translated. New functions:<ul><li>If your device is not connected to the Internet, this is now displayed at the top.</li><li>You can now update your bike view by dragging from top to bottom. Especially useful after you reconnect to the Internet.</li></ul> @@ -1566,6 +1580,42 @@ Wenn sich das Schloss weiterhin nicht öffnen lässt, vergewissern Sie sich, das If you have reserved or rented a bike, this will now be shown to you as an icon on the map page. Clicking on it will take you directly to the 'My bikes' page. We have also made small design changes. Wenn Sie ein Rad reserviert oder gemietet haben, wird dies Ihnen nun auf der Kartenseite als Symbol angezeigt. Ein Klick darauf führt Sie direkt zur Seite 'Meine Räder'. Wir haben außerdem kleine Designänderungen vorgenommen. + + End rental at an unknown location is not possible. +Start getting geolocation failed. + Beenden der Miete an unbekanntem Standort is nicht möglich. +Fehler beim Start der Standortabfrage! + + + End rental at an unknown location is not possible. +Getting geolocation failed. + Beenden der Miete an unbekanntem Standort is nicht möglich. +Fehler bei der Standortabfrage! + + + We could not assign the bike to any station. For this we need your location information while you are standing right next to the bike. Only then your rental can be terminated! + +Approach the bike, turn on Bluetooth and Location services and try again. + Wir konnten das Rad keiner Station zuordnen. Dazu benötigen wir Ihre Standortinformationen, während Sie direkt neben dem Rad stehen. Nur dann kann Ihre Miete beendet werden! + +Treten Sie an das Rad heran, schalten Sie Bluetooth und Standortdienste ein und versuchen Sie es erneut. + + + Some terms have been standardized, e.g:<br/> +- what used to be called 'return bike' is now always called 'end rental'.<br/> +- The 'operator' is the group of people responsible for the bike fleet, who will be contacted if necessary.<br/> +<br/> +Also:<br/> +- Minor bug fixes<br/> +- Package updates + Einige Bezeichnungen wurden vereinheitlicht, z.B:<br/> +- was bisher unter 'Rad zurückgeben' lief, heißt nun immer 'Miete beenden'.<br/> +- der 'Betreiber' ist die für die Radflotte zuständige Personengruppe, zu der bei Bedarf Kontakt aufgenommen wird.<br/> +<br/> +Außerdem:<br/> +- Kleinere Fehlerbehebungen<br/> +- Paketaktualisierungen + diff --git a/TINKLib/Services/Geolocation/Geolocation.cs b/TINKLib/Services/Geolocation/Geolocation.cs new file mode 100644 index 0000000..5901ca8 --- /dev/null +++ b/TINKLib/Services/Geolocation/Geolocation.cs @@ -0,0 +1,36 @@ +using System; + +namespace TINK.Services.Geolocation +{ + public class Geolocation : IGeolocation + { + private Geolocation() { } + + public DateTimeOffset Timestamp { get; private set; } + + public double Latitude { get; private set; } + + public double Longitude { get; private set; } + + public double? Accuracy { get; private set; } + + public class Builder + { + + public DateTimeOffset Timestamp { get; set; } + + public double Latitude { get; set; } + + public double Longitude { get; set; } + + public double? Accuracy { get; set; } + + public Geolocation Build() + => new Geolocation() { + Timestamp = Timestamp, + Latitude = Latitude, + Longitude = Longitude, + Accuracy = Accuracy}; + } + } +} diff --git a/TINKLib/Services/Geolocation/GeolocationService.cs b/TINKLib/Services/Geolocation/GeolocationService.cs index 11f6304..a24577a 100644 --- a/TINKLib/Services/Geolocation/GeolocationService.cs +++ b/TINKLib/Services/Geolocation/GeolocationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using Serilog; @@ -7,7 +7,7 @@ using Xamarin.Essentials; namespace TINK.Services.Geolocation { - public abstract class GeolocationService : IGeolocation + public abstract class GeolocationService : IGeolocationService { /// Timeout for geolocation request operations. private const int GEOLOCATIONREQUEST_TIMEOUT_MS = 5000; @@ -31,14 +31,14 @@ namespace TINK.Services.Geolocation /// Gets the current location. /// Token to cancel request for geolocation. /// Time when geolocation is of interest. Is used to determine whether cached geoloation can be used or not. - public async Task GetAsync(CancellationToken? cancellationToken = null, DateTime? timeStamp = null) + public async Task GetAsync(CancellationToken? cancellationToken = null, DateTime? timeStamp = null) { try { var request = new GeolocationRequest(Accuracy, TimeSpan.FromMilliseconds(GEOLOCATIONREQUEST_TIMEOUT_MS)); return cancellationToken.HasValue - ? await Xamarin.Essentials.Geolocation.GetLocationAsync(request, cancellationToken.Value) - : await Xamarin.Essentials.Geolocation.GetLocationAsync(request); + ? (await Xamarin.Essentials.Geolocation.GetLocationAsync(request, cancellationToken.Value)).ToGeolocation() + : (await Xamarin.Essentials.Geolocation.GetLocationAsync(request)).ToGeolocation(); } catch (FeatureNotSupportedException fnsEx) { diff --git a/TINKLib/Services/Geolocation/IGeolocation.cs b/TINKLib/Services/Geolocation/IGeolocation.cs index 938ea03..837d489 100644 --- a/TINKLib/Services/Geolocation/IGeolocation.cs +++ b/TINKLib/Services/Geolocation/IGeolocation.cs @@ -1,21 +1,15 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using TINK.Model.Device; -using Xamarin.Essentials; - +using System; namespace TINK.Services.Geolocation { - /// Query geolocation. - public interface IGeolocation : IGeolodationDependent + public interface IGeolocation { - /// Gets the current location. - /// Token to cancel request for geolocation. If null request can not be cancels and times out after GeolocationService.GEOLOCATIONREQUEST_TIMEOUT_MS if geolocation is not available. - /// Time when geolocation is of interest. Is used to determine for some implementations whether cached geoloation can be used or not. - /// - Task GetAsync(CancellationToken? cancellationToken = null, DateTime? timeStamp = null); - /// If true location data returned is simulated. - bool IsSimulation { get; } + double Latitude { get; } + + double Longitude { get; } + + double? Accuracy { get; } + + DateTimeOffset Timestamp { get; } } } diff --git a/TINKLib/Services/Geolocation/IGeolocationService.cs b/TINKLib/Services/Geolocation/IGeolocationService.cs new file mode 100644 index 0000000..f2bced7 --- /dev/null +++ b/TINKLib/Services/Geolocation/IGeolocationService.cs @@ -0,0 +1,21 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using TINK.Model.Device; +using Xamarin.Essentials; + +namespace TINK.Services.Geolocation +{ + /// Query geolocation. + public interface IGeolocationService : IGeolodationDependent + { + /// Gets the current location. + /// Token to cancel request for geolocation. If null request can not be cancels and times out after GeolocationService.GEOLOCATIONREQUEST_TIMEOUT_MS if geolocation is not available. + /// Time when geolocation is of interest. Is used to determine for some implementations whether cached geoloation can be used or not. + /// + Task GetAsync(CancellationToken? cancellationToken = null, DateTime? timeStamp = null); + + /// If true location data returned is simulated. + bool IsSimulation { get; } + } +} diff --git a/TINKLib/Services/Geolocation/LastKnownGeolocationService.cs b/TINKLib/Services/Geolocation/LastKnownGeolocationService.cs index ea4ddf8..4a28338 100644 --- a/TINKLib/Services/Geolocation/LastKnownGeolocationService.cs +++ b/TINKLib/Services/Geolocation/LastKnownGeolocationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using Serilog; @@ -7,7 +7,7 @@ using Xamarin.Essentials; namespace TINK.Services.Geolocation { - public class LastKnownGeolocationService : IGeolocation + public class LastKnownGeolocationService : IGeolocationService { private IGeolodationDependent Dependent { get; } @@ -19,12 +19,12 @@ namespace TINK.Services.Geolocation /// Gets the current location. /// Token to cancel request for geolocation. /// Time when geolocation is of interest. Is used to determine whether cached geoloation can be used or not. - public async Task GetAsync(CancellationToken? cancelationToken = null, DateTime? timeStamp = null) + public async Task GetAsync(CancellationToken? cancelationToken = null, DateTime? timeStamp = null) { - Location location; + IGeolocation location; try { - location = await Xamarin.Essentials.Geolocation.GetLastKnownLocationAsync(); + location = (await Xamarin.Essentials.Geolocation.GetLastKnownLocationAsync()).ToGeolocation(); } catch (FeatureNotSupportedException fnsEx) { diff --git a/TINKLib/Services/Geolocation/LocationHelper.cs b/TINKLib/Services/Geolocation/LocationHelper.cs new file mode 100644 index 0000000..9f7a4f0 --- /dev/null +++ b/TINKLib/Services/Geolocation/LocationHelper.cs @@ -0,0 +1,21 @@ +using Xamarin.Essentials; + +namespace TINK.Services.Geolocation +{ + public static class LocationHelper + { + /// + /// Converts Xamarin.Essentials Location object to Geolocatin object. + /// + /// + /// + public static IGeolocation ToGeolocation(this Location location) + => new Geolocation.Builder + { + Latitude = location.Latitude, + Longitude = location.Longitude, + Accuracy = location.Accuracy, + Timestamp = location.Timestamp, + }.Build(); + } +} diff --git a/TINKLib/Services/Geolocation/SimulatedGeolocationService.cs b/TINKLib/Services/Geolocation/SimulatedGeolocationService.cs index a937a4f..c0c3e34 100644 --- a/TINKLib/Services/Geolocation/SimulatedGeolocationService.cs +++ b/TINKLib/Services/Geolocation/SimulatedGeolocationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using TINK.Model.Device; @@ -6,7 +6,7 @@ using Xamarin.Essentials; namespace TINK.Services.Geolocation { - public class SimulatedGeolocationService : IGeolocation + public class SimulatedGeolocationService : IGeolocationService { private IGeolodationDependent Dependent { get; } @@ -18,9 +18,13 @@ namespace TINK.Services.Geolocation /// Gets the current location. /// Token to cancel request for geolocation. /// Time when geolocation is of interest. Is used to determine whether cached geoloation can be used or not. - public async Task GetAsync(CancellationToken? cancelToken = null, DateTime? timeStamp = null) + public async Task GetAsync(CancellationToken? cancelToken = null, DateTime? timeStamp = null) { - return await Task.FromResult(new Location(47.976634, 7.825490) { Accuracy = 0, Timestamp = timeStamp ?? DateTime.Now }); ; + return await Task.FromResult(new Geolocation.Builder { + Latitude = 47.976634, + Longitude = 7.825490, + Accuracy = 0, + Timestamp = timeStamp ?? DateTime.Now }.Build()); ; } /// If true location data returned is simulated. diff --git a/TINKLib/TINKLib.csproj b/TINKLib/TINKLib.csproj index 9a29571..efa22f2 100644 --- a/TINKLib/TINKLib.csproj +++ b/TINKLib/TINKLib.csproj @@ -26,7 +26,7 @@ - + @@ -45,7 +45,7 @@ - + diff --git a/TINKLib/ViewModel/Bikes/Bike/BikeViewModelFactory.cs b/TINKLib/ViewModel/Bikes/Bike/BikeViewModelFactory.cs index 7129533..ea6eabe 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BikeViewModelFactory.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BikeViewModelFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using TINK.Model.Connector; using TINK.Model.Device; using TINK.Model.User; @@ -17,7 +17,7 @@ namespace TINK.ViewModel.Bikes.Bike public static BikeViewModelBase Create( Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocationService, ILocksService lockService, Action bikeRemoveDelegate, Func viewUpdateManager, @@ -34,7 +34,7 @@ namespace TINK.ViewModel.Bikes.Bike return new BluetoothLock.BikeViewModel( isConnectedDelegate, connectorFactory, - geolocation, + geolocationService, lockService, bikeRemoveDelegate, viewUpdateManager, diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/BikeViewModel.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/BikeViewModel.cs index 3ce8822..9f6038d 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/BikeViewModel.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/BikeViewModel.cs @@ -27,7 +27,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock /// Notifies GUI about changes. public override event PropertyChangedEventHandler PropertyChanged; - private IGeolocation Geolocation { get; } + private IGeolocationService GeolocationService { get; } private ILocksService LockService { get; } @@ -91,7 +91,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock public BikeViewModel( Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocationService, ILocksService lockService, Action bikeRemoveDelegate, Func viewUpdateManager, @@ -117,7 +117,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock selectedBike, isConnectedDelegate, connectorFactory, - geolocation, + geolocationService, lockService, viewUpdateManager, smartDevice, @@ -129,8 +129,8 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock viewService, bikesViewModel); - Geolocation = geolocation - ?? throw new ArgumentException($"Can not instantiate {this.GetType().Name}-object. Parameter {nameof(geolocation)} can not be null."); + GeolocationService = geolocationService + ?? throw new ArgumentException($"Can not instantiate {this.GetType().Name}-object. Parameter {nameof(geolocationService)} can not be null."); LockService = lockService ?? throw new ArgumentException($"Can not instantiate {this.GetType().Name}-object. Parameter {nameof(lockService)} can not be null."); @@ -156,7 +156,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock Bike, IsConnectedDelegate, ConnectorFactory, - Geolocation, + GeolocationService, LockService, ViewUpdateManager, SmartDevice, @@ -208,7 +208,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock // No state change occurred (same instance is returned). return; } - + RaisePropertyChangedEvent( lastHandler, lastStateText, diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/Base.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/Base.cs index b15ccd7..c607a80 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/Base.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/Base.cs @@ -1,4 +1,4 @@ -using System; +using System; using TINK.Model.Connector; using TINK.Model.Device; using TINK.Model.User; @@ -22,7 +22,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler bool isCopriButtonVisible, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -30,14 +30,14 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikesViewModel bikesViewModel, IUser activeUser) : base(selectedBike, buttonText, isCopriButtonVisible, isConnectedDelegate, connectorFactory, viewUpdateManager, smartDevice, viewService, bikesViewModel, activeUser) { - Geolocation = geolocation + GeolocationService = geolocation ?? throw new ArgumentException($"Can not construct {GetType().Name}-object. Parameter {nameof(geolocation)} must not be null."); LockService = lockService ?? throw new ArgumentException($"Can not construct {GetType().Name}-object. Parameter {nameof(lockService)} must not be null."); } - protected IGeolocation Geolocation { get; } + protected IGeolocationService GeolocationService { get; } protected ILocksService LockService { get; } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedClosed.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedClosed.cs index 4073eaf..2e71688 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedClosed.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedClosed.cs @@ -15,7 +15,6 @@ using TINK.Services.BluetoothLock; using TINK.Services.BluetoothLock.Exception; using TINK.Services.Geolocation; using TINK.View; -using Xamarin.Essentials; namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler { @@ -27,7 +26,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -62,24 +61,69 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler { BikesViewModel.IsIdle = false; var ctsLocation = new CancellationTokenSource(); - Task currentLocationTask = null; - var timeStamp = DateTime.Now; + Task currentLocationTask = null; + + // Try getting geolocation which was requested when closing lock. + IGeolocation currentLocation = SelectedBike.LockInfo.Location; + var lastConfimredLockStateTimeStamp = SelectedBike.LockInfo.LastLockingStateChange; // Check if bike is around. var deviceState = LockService[SelectedBike.LockInfo.Id].GetDeviceState(); - if (deviceState == DeviceState.Connected) + + // Check if + // - geolocation is already available + // - or if bike is in reach so that geolocation makes sense + if (currentLocation == null && deviceState != DeviceState.Connected) { - BikesViewModel.ActionText = AppResources.ActivityTextQueryLocationStart; // Bluetooth is in reach + // Geolocation information is missing and can not be queried. + Log.ForContext().Information("User selected booked bike {bike} but returning failed. COPRI returned an error.", SelectedBike); + + await ViewService.DisplayAlert( + AppResources.ErrorReturnBikeTitle, + AppResources.Error_ReturnBike_Station_Location_Message, + AppResources.MessageAnswerOk); + + // Disconnect lock. + BikesViewModel.ActionText = AppResources.ActivityTextDisconnectingLock; + try + { + SelectedBike.LockInfo.State = await LockService.DisconnectAsync(SelectedBike.LockInfo.Id, SelectedBike.LockInfo.Guid); + } + catch (Exception exception) + { + Log.ForContext().Error("Lock can not be disconnected. {Exception}", exception); + + BikesViewModel.ActionText = AppResources.ActivityTextErrorDisconnect; + } + + BikesViewModel.ActionText = string.Empty; + BikesViewModel.IsIdle = true; + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + } + + // Check if quering geolocation is required. + if (currentLocation == null) + { + BikesViewModel.ActionText = AppResources.ActivityTextQueryLocationStart; // Start getting geolocation. try { - currentLocationTask = Geolocation.GetAsync(ctsLocation.Token, timeStamp); + currentLocationTask = GeolocationService.GetAsync(ctsLocation.Token, DateTime.Now); } catch (Exception ex) { // No location information available. Log.ForContext().Information("Getting geolocation when returning bike {Bike} failed. {Exception}", SelectedBike, ex); + + await ViewService.DisplayAlert( + AppResources.ErrorReturnBikeTitle, + AppResources.ErrorReturnBikeLockClosedStartGetGPSExceptionMessage, + AppResources.MessageAnswerOk); + + BikesViewModel.ActionText = string.Empty; + BikesViewModel.IsIdle = true; + return this; } } @@ -119,10 +163,11 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = AppResources.ActivityTextOneMomentPlease; await ViewUpdateManager().StopUpdatePeridically(); - // Check if bike is around. - Location currentLocation = null; + // Get geolocation if + // - geolocation was not available when closing lock + // - bike is around (lock is connected via bluetooth) LocationDto currentLocationDto = null; - if (deviceState == DeviceState.Connected) + if (currentLocation == null) { BikesViewModel.ActionText = AppResources.ActivityTextQueryLocation; try @@ -134,24 +179,32 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler { // No location information available. Log.ForContext().Information("Returning closed bike {Bike} is not possible. Cancel geolocation query failed. {Exception}", SelectedBike, ex); + + await ViewService.DisplayAlert( + AppResources.ErrorReturnBikeTitle, + AppResources.ErrorReturnBikeLockClosedGetGPSExceptionMessage, + AppResources.MessageAnswerOk); + + BikesViewModel.ActionText = AppResources.ActivityTextStartingUpdater; + await ViewUpdateManager().StartUpdateAyncPeridically(); + BikesViewModel.ActionText = string.Empty; + BikesViewModel.IsIdle = true; + return this; } - currentLocationDto = currentLocation != null - ? new LocationDto.Builder - { - Latitude = currentLocation.Latitude, - Longitude = currentLocation.Longitude, - Accuracy = currentLocation.Accuracy ?? double.NaN, - Age = timeStamp.Subtract(currentLocation.Timestamp.DateTime), - }.Build() - : null; - } - else - { - // Bluetooth out of reach. Lock state is no more known. - SelectedBike.LockInfo.State = LockingState.UnknownDisconnected; + lastConfimredLockStateTimeStamp = DateTime.Now; } + currentLocationDto = currentLocation != null + ? new LocationDto.Builder + { + Latitude = currentLocation.Latitude, + Longitude = currentLocation.Longitude, + Accuracy = currentLocation.Accuracy ?? double.NaN, + Age = lastConfimredLockStateTimeStamp is DateTime lastLockState ? lastLockState.Subtract(currentLocation.Timestamp.DateTime) : TimeSpan.MaxValue, + }.Build() + : null; + BikesViewModel.ActionText = AppResources.ActivityTextReturningBike; IsConnected = IsConnectedDelegate(); @@ -229,7 +282,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User returned bike {bike} successfully.", SelectedBike); @@ -289,7 +342,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } #endif if (bookingFinished != null && bookingFinished.MiniSurvey.Questions.Count > 0) @@ -302,7 +355,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Open bike and update COPRI lock state. @@ -384,7 +437,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextReadingChargingLevel; @@ -454,7 +507,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedDisconnected.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedDisconnected.cs index fafd631..0ef34ab 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedDisconnected.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedDisconnected.cs @@ -24,7 +24,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -240,7 +240,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedOpen.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedOpen.cs index 5b34602..60da064 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedOpen.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedOpen.cs @@ -16,7 +16,6 @@ using TINK.Services.BluetoothLock.Exception; using TINK.Services.Geolocation; using TINK.Services.Logging; using TINK.View; -using Xamarin.Essentials; namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler { @@ -27,7 +26,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -66,11 +65,11 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler // Start getting geolocation. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocationStart; var ctsLocation = new CancellationTokenSource(); - Task currentLocationTask = null; + Task currentLocationTask = null; var timeStamp = DateTime.Now; try { - currentLocationTask = Geolocation.GetAsync(ctsLocation.Token, timeStamp); + currentLocationTask = GeolocationService.GetAsync(ctsLocation.Token, timeStamp); } catch (Exception ex) { @@ -88,7 +87,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Ask whether to really return bike? @@ -168,7 +167,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Close lock @@ -255,7 +254,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Check locking state. @@ -307,12 +306,12 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Get geolocation information. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocation; - Location currentLocation = null; + IGeolocation currentLocation = null; try { var task = await Task.WhenAny(new List { currentLocationTask }); @@ -335,7 +334,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Notify COPRI about end of rental: "request=booking_update ... "&state=available" ... &lock_state=locked ..." @@ -428,7 +427,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User returned bike {bike} successfully.", SelectedBike); @@ -488,7 +487,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } #endif @@ -501,7 +500,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Close lock in order to pause ride and update COPRI lock state. @@ -518,11 +517,11 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler // Start getting geolocation. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocationStart; var ctsLocation = new CancellationTokenSource(); - Task currentLocationTask = null; + Task currentLocationTask = null; var timeStamp = DateTime.Now; try { - currentLocationTask = Geolocation.GetAsync(ctsLocation.Token, timeStamp); + currentLocationTask = GeolocationService.GetAsync(ctsLocation.Token, timeStamp); } catch (Exception ex) { @@ -606,12 +605,12 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Get geoposition. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocation; - Location currentLocation = null; + IGeolocation currentLocation = null; try { await Task.WhenAny(new List { currentLocationTask }); @@ -625,6 +624,9 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = AppResources.ActivityTextErrorQueryLocationWhenAny; } + // Keep geolocation where closing action occurred. + SelectedBike.LockInfo.Location = currentLocation; + // Lock list to avoid multiple taps while copri action is pending. BikesViewModel.ActionText = AppResources.ActivityTextStartingUpdatingLockingState; @@ -673,7 +675,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedUnknown.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedUnknown.cs index c1775cc..a95a651 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedUnknown.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/BookedUnknown.cs @@ -26,7 +26,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -136,7 +136,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextReadingChargingLevel; @@ -206,7 +206,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Close lock in order to pause ride and update COPRI lock state. @@ -220,11 +220,11 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler // Start getting geolocation. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocationStart; var ctsLocation = new CancellationTokenSource(); - Task currentLocationTask = null; + Task currentLocationTask = null; var timeStamp = DateTime.Now; try { - currentLocationTask = Geolocation.GetAsync(ctsLocation.Token, timeStamp); + currentLocationTask = GeolocationService.GetAsync(ctsLocation.Token, timeStamp); } catch (Exception ex) { @@ -307,12 +307,12 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Get geoposition. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocation; - Location currentLocation = null; + IGeolocation currentLocation = null; try { await Task.WhenAny(new List { currentLocationTask ?? Task.CompletedTask }); @@ -374,7 +374,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableDisconnected.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableDisconnected.cs index a5de226..98f98a4 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableDisconnected.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableDisconnected.cs @@ -25,7 +25,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -160,7 +160,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } SelectedBike.LockInfo.State = result?.State?.GetLockingState() ?? LockingState.UnknownDisconnected; @@ -174,7 +174,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } SelectedBike.LockInfo.Guid = result?.Guid ?? new Guid(); @@ -212,7 +212,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User selected recently requested bike {bike} in order to book.", SelectedBike); @@ -254,7 +254,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Unlock bike. @@ -323,7 +323,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } if (SelectedBike.LockInfo.State != LockingState.Open) @@ -334,7 +334,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextReadingChargingLevel; @@ -404,7 +404,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Requst is not supported, button should be disabled. diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableOpen.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableOpen.cs index b996671..ba9ecea 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableOpen.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/DisposableOpen.cs @@ -37,7 +37,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -142,7 +142,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Disconnect lock. @@ -162,7 +162,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Lock list to avoid multiple taps while copri action is pending. @@ -255,7 +255,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler // Update status text and unlock list of bikes because no more action is pending. BikesViewModel.ActionText = string.Empty; // Todo: Move this statement in front of finally block because in catch block BikesViewModel.ActionText is already set to empty. BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User reserved bike {bike} successfully.", SelectedBike); @@ -267,7 +267,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler // Update status text and unlock list of bikes because no more action is pending. BikesViewModel.ActionText = string.Empty; // Todo: Move this statement in front of finally block because in catch block BikesViewModel.ActionText is already set to empty. BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Requst is not supported, button should be disabled. diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedClosed.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedClosed.cs index c67016f..c998fe5 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedClosed.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedClosed.cs @@ -30,7 +30,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -131,7 +131,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User canceled reservation of bike {l_oId} successfully.", SelectedBike.Id); @@ -153,7 +153,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Open lock and book bike. @@ -219,7 +219,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Unlock bike. @@ -288,7 +288,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } if (SelectedBike.LockInfo.State != LockingState.Open) @@ -299,7 +299,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextReadingChargingLevel; @@ -369,7 +369,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedDisconnected.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedDisconnected.cs index 8c17b12..4c9bc91 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedDisconnected.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedDisconnected.cs @@ -24,7 +24,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -124,7 +124,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User canceled reservation of bike {l_oId} successfully.", SelectedBike.Id); @@ -133,7 +133,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Connect to reserved bike ask whether to book bike bike or not and if yes open lock. @@ -340,7 +340,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User selected recently requested bike {bike} in order to book.", SelectedBike); @@ -382,7 +382,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Unlock bike. @@ -451,7 +451,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } if (SelectedBike.LockInfo.State != LockingState.Open) @@ -462,7 +462,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextReadingChargingLevel; @@ -534,7 +534,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedOpen.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedOpen.cs index c30d78e..9628ef7 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedOpen.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedOpen.cs @@ -29,7 +29,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -152,7 +152,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User booked bike {bike} successfully.", SelectedBike); @@ -162,7 +162,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Close lock and cancel reservation. @@ -220,7 +220,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextCancelingReservation; @@ -268,7 +268,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } Log.ForContext().Information("User canceled reservation of bike {l_oId} successfully.", SelectedBike.Id); @@ -290,7 +290,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); // Restart polling again. BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; // Unlock GUI - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Manage sound/ alarm settings. @@ -364,7 +364,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler exception.Message, "OK"); - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Switch off alarm. @@ -395,7 +395,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler exception.Message, "OK"); - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } finally { diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedUnknown.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedUnknown.cs index 523c9cb..c9a657f 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedUnknown.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/ReservedUnknown.cs @@ -26,7 +26,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -132,7 +132,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } BikesViewModel.ActionText = AppResources.ActivityTextReadingChargingLevel; @@ -202,7 +202,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } /// Close lock in order to pause ride and update COPRI lock state. @@ -220,11 +220,11 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler // Start getting geolocation. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocationStart; var ctsLocation = new CancellationTokenSource(); - Task currentLocationTask = null; + Task currentLocationTask = null; var timeStamp = DateTime.Now; try { - currentLocationTask = Geolocation.GetAsync(ctsLocation.Token, timeStamp); + currentLocationTask = GeolocationService.GetAsync(ctsLocation.Token, timeStamp); } catch (Exception ex) { @@ -307,12 +307,12 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } // Get geoposition. BikesViewModel.ActionText = AppResources.ActivityTextQueryLocation; - Location currentLocation = null; + IGeolocation currentLocation = null; try { await Task.WhenAny(new List { currentLocationTask ?? Task.CompletedTask }); @@ -374,7 +374,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler await ViewUpdateManager().StartUpdateAyncPeridically(); BikesViewModel.ActionText = string.Empty; BikesViewModel.IsIdle = true; - return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, Geolocation, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); + return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, GeolocationService, LockService, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser); } } } diff --git a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandlerFactory.cs b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandlerFactory.cs index 75999e3..0e972da 100644 --- a/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandlerFactory.cs +++ b/TINKLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandlerFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using Serilog; using TINK.Model.Bikes.BikeInfoNS.BluetoothLock; using TINK.Model.Connector; @@ -18,7 +18,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock /// /// /// - /// + /// /// /// Provides info about the smart device (phone, tablet, ...) /// @@ -28,7 +28,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock Model.Bikes.BikeInfoNS.BC.IBikeInfoMutable selectedBike, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, Func viewUpdateManager, ISmartDevice smartDevice, @@ -36,7 +36,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock IBikesViewModel bikesViewModel, IUser activeUser) { - if (!(selectedBike is Model.Bikes.BikeInfoNS.BluetoothLock.IBikeInfoMutable selectedBluetoothLockBike)) + if (!(selectedBike is IBikeInfoMutable selectedBluetoothLockBike)) return null; switch (selectedBluetoothLockBike.State.Value) diff --git a/TINKLib/ViewModel/Bikes/BikesViewModel.cs b/TINKLib/ViewModel/Bikes/BikesViewModel.cs index ca22487..6363509 100644 --- a/TINKLib/ViewModel/Bikes/BikesViewModel.cs +++ b/TINKLib/ViewModel/Bikes/BikesViewModel.cs @@ -36,7 +36,7 @@ namespace TINK.ViewModel.Bikes /// Provides a connector object. protected Func ConnectorFactory { get; } - protected IGeolocation Geolocation { get; } + protected IGeolocationService GeolocationService { get; } /// Provides a connector object. protected ILocksService LockService { get; } @@ -99,7 +99,7 @@ namespace TINK.ViewModel.Bikes string runtimPlatform, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, TINK.Settings.PollingParameters polling, Action postAction, @@ -123,7 +123,7 @@ namespace TINK.ViewModel.Bikes ConnectorFactory = connectorFactory ?? throw new ArgumentException("Can not instantiate bikes page view model- object. No connector available."); - Geolocation = geolocation + GeolocationService = geolocation ?? throw new ArgumentException("Can not instantiate bikes page view model- object. No geolocation object available."); LockService = lockService @@ -182,7 +182,7 @@ namespace TINK.ViewModel.Bikes var bikeViewModel = BikeViewModelFactory.Create( IsConnectedDelegate, ConnectorFactory, - Geolocation, + GeolocationService, LockService, (id) => Remove(id), () => m_oViewUpdateManager, diff --git a/TINKLib/ViewModel/BikesAtStation/BikesAtStationPageViewModel.cs b/TINKLib/ViewModel/BikesAtStation/BikesAtStationPageViewModel.cs index 270d0ac..24ee9fc 100644 --- a/TINKLib/ViewModel/BikesAtStation/BikesAtStationPageViewModel.cs +++ b/TINKLib/ViewModel/BikesAtStation/BikesAtStationPageViewModel.cs @@ -79,7 +79,7 @@ namespace TINK.ViewModel.BikesAtStation IStation selectedStation, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, PollingParameters polling, Action openUrlInExternalBrowser, @@ -306,7 +306,7 @@ namespace TINK.ViewModel.BikesAtStation } } - if (Geolocation.IsGeolcationEnabled == false) + if (GeolocationService.IsGeolcationEnabled == false) { await ViewService.DisplayAlert( AppResources.MessageTitleHint, diff --git a/TINKLib/ViewModel/Contact/SelectStationPageViewModel.cs b/TINKLib/ViewModel/Contact/SelectStationPageViewModel.cs index abb6287..d51a155 100644 --- a/TINKLib/ViewModel/Contact/SelectStationPageViewModel.cs +++ b/TINKLib/ViewModel/Contact/SelectStationPageViewModel.cs @@ -22,7 +22,6 @@ using TINK.MultilingualResources; using TINK.Repository; using TINK.Services.Geolocation; using TINK.Model.State; -using TINK.ViewModel.Map; namespace TINK.ViewModel.Contact { @@ -86,7 +85,7 @@ namespace TINK.ViewModel.Contact /// False if user tabed on station marker to show bikes at a given station. private bool isMapPageEnabled = false; - IGeolocation GeolocationService { get; } + IGeolocationService GeolocationService { get; } /// False if user tabed on station marker to show bikes at a given station. public bool IsMapPageEnabled @@ -111,7 +110,7 @@ namespace TINK.ViewModel.Contact ITinkApp tinkApp, ILocationPermission permissionsService, Plugin.BLE.Abstractions.Contracts.IBluetoothLE bluetoothService, - IGeolocation geolocationService, + IGeolocationService geolocationService, Action moveToRegionDelegate, IViewService viewService, INavigation navigation) @@ -162,7 +161,7 @@ namespace TINK.ViewModel.Contact /// /// One time setup: Sets pins into map and connects to events. /// - private async void InitializePins(StationDictionary stations) + private void InitializePins(StationDictionary stations) { // Add pins to stations. Log.ForContext().Debug($"Request to draw {stations.Count} pins."); @@ -309,7 +308,7 @@ namespace TINK.ViewModel.Contact { ActionText = AppResources.ActivityTextCenterMap; - Location currentLocation = null; + IGeolocation currentLocation = null; try { currentLocation = TinkApp.CenterMapToCurrentLocation @@ -428,7 +427,7 @@ namespace TINK.ViewModel.Contact public static void MoveAndScale( Action moveToRegionDelegate, Uri activeUri, - Location currentLocation = null) + IGeolocation currentLocation = null) { if (currentLocation != null) { diff --git a/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs b/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs index f8a9662..5257b09 100644 --- a/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs +++ b/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs @@ -124,7 +124,7 @@ namespace TINK.ViewModel.FindBike string runtimPlatform, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, IEnumerable stations, PollingParameters polling, @@ -331,7 +331,7 @@ namespace TINK.ViewModel.FindBike } // Location state - if (Geolocation.IsGeolcationEnabled == false) + if (GeolocationService.IsGeolcationEnabled == false) { await ViewService.DisplayAlert( AppResources.MessageTitleHint, diff --git a/TINKLib/ViewModel/Map/MapPageViewModel.cs b/TINKLib/ViewModel/Map/MapPageViewModel.cs index 78cfb51..8be95a0 100644 --- a/TINKLib/ViewModel/Map/MapPageViewModel.cs +++ b/TINKLib/ViewModel/Map/MapPageViewModel.cs @@ -27,13 +27,6 @@ using TINK.Repository; using TINK.Services.Geolocation; using TINK.Model.State; using TINK.ViewModel.Bikes; -using Location = Xamarin.Essentials.Location; - - - - - - #if !TRYNOTBACKSTYLE #endif @@ -63,8 +56,6 @@ namespace TINK.ViewModel.Map /// private ILocationPermission PermissionsService { get; } - private IGeolocation Geolocation { get; } - /// /// Service to manage bluetooth stack. /// @@ -110,7 +101,7 @@ namespace TINK.ViewModel.Map /// False if user tabed on station marker to show bikes at a given station. private bool isMapPageEnabled = false; - IGeolocation GeolocationService { get; } + IGeolocationService GeolocationService { get; } /// False if user tabed on station marker to show bikes at a given station. public bool IsMapPageEnabled @@ -135,7 +126,7 @@ namespace TINK.ViewModel.Map ITinkApp tinkApp, ILocationPermission permissionsService, Plugin.BLE.Abstractions.Contracts.IBluetoothLE bluetoothService, - IGeolocation geolocationService, + IGeolocationService geolocationService, Action moveToRegionDelegate, IViewService viewService, INavigation navigation) @@ -197,6 +188,27 @@ namespace TINK.ViewModel.Map set { m_oNavigationMasterDetail = value; } } #endif + /// + /// Counts the number of reserved or occupied bikes -> visualized in MyBikes-Icon + /// + public void GetMyBikesCount(BikeCollection bikesAll) + { + int MyBikesCount = 0; + Log.ForContext().Debug($"Number of reserved or rented bikes is extracted."); + if (bikesAll != null) + { + foreach (var bike in bikesAll) + { + if (bike.State.Value.IsOccupied()) + { + MyBikesCount = MyBikesCount + 1; + continue; + } + + } + } + MyBikesCountText = MyBikesCount > 0 ? string.Format(MyBikesCount.ToString()) : string.Empty; + } public Command PinClickedCommand => new Command( args => @@ -243,7 +255,6 @@ namespace TINK.ViewModel.Map { Log.ForContext().Debug($"Starting update of stations pins color for {stationsColorList.Count} stations..."); - int MyBikesCount = 0; // Update colors of pins. for (int pinIndex = 0; pinIndex < stationsColorList.Count; pinIndex++) { @@ -253,11 +264,6 @@ namespace TINK.ViewModel.Map : "Open"; // there is no station marker. Use open marker. var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]); - if (colorPartPrefix == "Blue" || colorPartPrefix == "LightBlue") - { - MyBikesCount = MyBikesCount + 1; - }; - var name = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}"; try { @@ -273,8 +279,6 @@ namespace TINK.ViewModel.Map Pins[pinIndex].IsVisible = true; } - MyBikesCountText = MyBikesCount > 0 ? string.Format(MyBikesCount.ToString()) : string.Empty; - var pinsCount = Pins.Count; for (int pinIndex = stationsColorList.Count; pinIndex < pinsCount; pinIndex++) { @@ -343,6 +347,10 @@ namespace TINK.ViewModel.Map IsProcessWithRunningProcessView = true; IsNavBarVisible = false; + + // Get and expose status of location permission + GetLocationPermissionStatus(); + // Process map page. Polling = TinkApp.Polling; @@ -350,7 +358,7 @@ namespace TINK.ViewModel.Map $"{(Polling != null && Polling.IsActivated ? $"Map page is appearing. Update periode is {Polling.Periode.TotalSeconds} sec." : "Map page is appearing. Polling is off.")}" + $"Current UI language is {Thread.CurrentThread.CurrentUICulture.Name}."); - // Update map page filter + // Update map page filter ActiveFilterMap = TinkApp.GroupFilterMapPage; ActionText = AppResources.ActivityTextMapLoadingStationsAndBikes; @@ -393,6 +401,9 @@ namespace TINK.ViewModel.Map Log.ForContext().Verbose("Update pins color done."); + // Load MyBikes Count -> MyBikes Icon/Button + GetMyBikesCount(resultStationsAndBikes.Response.Bikes); + // Move and scale before getting stations and bikes which takes some time. ActionText = AppResources.ActivityTextCenterMap; @@ -460,6 +471,22 @@ namespace TINK.ViewModel.Map } } + /// + /// IsLocationPermissionGranted = true, if Location Permissions granted. + /// + private async void GetLocationPermissionStatus() + { + Log.ForContext().Verbose("Check Location permissions."); + var status = await PermissionsService.CheckStatusAsync(); + IsLocationPermissionGranted = status == Status.Granted ? true : false; + Log.ForContext().Verbose("Location permissions: {0}.", status); + } + + /// + /// Exposes IsLocationPermissionGranted. + /// + public bool IsLocationPermissionGranted{ get; set;} + /// /// Invoked when the auth cookie is not defined. /// @@ -536,7 +563,7 @@ namespace TINK.ViewModel.Map /// private async Task GetFromLocationService(Status status) { - Location currentLocation = null; + IGeolocation currentLocation = null; try { currentLocation = await GeolocationService.GetAsync(); @@ -627,6 +654,9 @@ namespace TINK.ViewModel.Map Log.ForContext().Error("Getting bikes and stations in polling context failed with exception {Exception}.", exception); } + // Load MyBikes Count -> MyBikes Icon/Button + GetMyBikesCount(resultStationsAndBikes.Response.Bikes); + // Check if there are alreay any pins to the map. // If no initialze pins. if (Pins.Count <= 0) diff --git a/TINKLib/ViewModel/MyBikes/MyBikesPageViewModel.cs b/TINKLib/ViewModel/MyBikes/MyBikesPageViewModel.cs index 4047dcc..04b0363 100644 --- a/TINKLib/ViewModel/MyBikes/MyBikesPageViewModel.cs +++ b/TINKLib/ViewModel/MyBikes/MyBikesPageViewModel.cs @@ -76,7 +76,7 @@ namespace TINK.ViewModel.MyBikes string runtimPlatform, Func isConnectedDelegate, Func connectorFactory, - IGeolocation geolocation, + IGeolocationService geolocation, ILocksService lockService, IEnumerable stations, PollingParameters p_oPolling, @@ -194,7 +194,7 @@ namespace TINK.ViewModel.MyBikes } // Location state - if (Geolocation.IsGeolcationEnabled == false) + if (GeolocationService.IsGeolcationEnabled == false) { await ViewService.DisplayAlert( AppResources.MessageTitleHint, diff --git a/TINKLib/ViewModel/Settings/SettingsPageViewModel.cs b/TINKLib/ViewModel/Settings/SettingsPageViewModel.cs index 32cd8d9..4ffc658 100644 --- a/TINKLib/ViewModel/Settings/SettingsPageViewModel.cs +++ b/TINKLib/ViewModel/Settings/SettingsPageViewModel.cs @@ -65,7 +65,7 @@ namespace TINK.ViewModel /// Reference on the tink app instance. private ITinkApp TinkApp { get; } - IServicesContainer GeoloctionServicesContainer { get; } + IServicesContainer GeoloctionServicesContainer { get; } /// Constructs a settings page view model object. /// Reference to tink app model. @@ -73,7 +73,7 @@ namespace TINK.ViewModel /// Interface to view public SettingsPageViewModel( ITinkApp tinkApp, - IServicesContainer geoloctionServicesContainer, + IServicesContainer geoloctionServicesContainer, IViewService viewService) { TinkApp = tinkApp diff --git a/TestTINKLib/Mocks/DateTimeMocker.cs b/TestFramework/DateTimeMocker.cs similarity index 100% rename from TestTINKLib/Mocks/DateTimeMocker.cs rename to TestFramework/DateTimeMocker.cs diff --git a/TestTINKLib/Mocks/Connector/CopriCallsCacheMemory.cs b/TestFramework/Services/CopriApi/CopriCallsCacheMemory.cs similarity index 100% rename from TestTINKLib/Mocks/Connector/CopriCallsCacheMemory.cs rename to TestFramework/Services/CopriApi/CopriCallsCacheMemory.cs diff --git a/TestFramework/Services/Geolocation/GeolocationMock.cs b/TestFramework/Services/Geolocation/GeolocationMock.cs index ca35b71..f857263 100644 --- a/TestFramework/Services/Geolocation/GeolocationMock.cs +++ b/TestFramework/Services/Geolocation/GeolocationMock.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using TINK.Services.Geolocation; @@ -6,10 +6,10 @@ using Xamarin.Essentials; namespace TestFramework.Model.Services.Geolocation { - public class GeolocationMock : IGeolocation + public class GeolocationMock : IGeolocationService { - public Task GetAsync(CancellationToken? cancelToken = null, DateTime? timeStamp = null) + public Task GetAsync(CancellationToken? cancelToken = null, DateTime? timeStamp = null) { throw new NotImplementedException(); } diff --git a/TestLockItBLE/Services/BluetoothLock/BLE/TestLockItServiceBase.cs b/TestLockItBLE/Services/BluetoothLock/BLE/TestLockItServiceBase.cs index cd4147b..21c1bc6 100644 --- a/TestLockItBLE/Services/BluetoothLock/BLE/TestLockItServiceBase.cs +++ b/TestLockItBLE/Services/BluetoothLock/BLE/TestLockItServiceBase.cs @@ -1,10 +1,13 @@ -using System; +using System; using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; using NSubstitute; using NUnit.Framework; +using Plugin.BLE.Abstractions.Contracts; using TINK.Services.BluetoothLock; using TINK.Services.BluetoothLock.BLE; +using TINK.Services.BluetoothLock.Exception; using TINK.Services.BluetoothLock.Tdo; namespace TestLockItBLE.Services.BluetoothLock.BLE @@ -64,5 +67,77 @@ namespace TestLockItBLE.Services.BluetoothLock.BLE await disconnectedDevice.Received().ReconnectAsync(Arg.Any(), Arg.Any()); } + + [Test] + public void TestConnect_Connected_InvalidArgs() + { + var device = Substitute.For(); + var adapter = Substitute.For(); + var cipher = Substitute.For(); + + var exception = Assert.Throws( + () => { var lockIt = LockItEventBased.Authenticate(device, null, adapter, cipher).Result; }, + "If connected no auth is requied."); + + Assert.That(exception.InnerExceptions.Count > 0); + Assert.That(exception.InnerExceptions[0], Is.InstanceOf()); + + } + + [Test] + public void TestConnect_Connected() + { + var device = Substitute.For(); + var adapter = Substitute.For(); + var cipher = Substitute.For(); + var auth = Substitute.For(); + var lockControl = Substitute.For(); + + var authTdo = new LockInfoAuthTdo.Builder + { + Id = 12, + K_seed = new byte[] { (byte)'i', (byte)'V', (byte)'F', (byte)'m', (byte)'u', (byte)'T', (byte)'n', (byte)'K', (byte)'q', (byte)'E', (byte)'Y', (byte)'h', (byte)'m', (byte)'T', (byte)'l', (byte)'e' }, + K_u = new byte[16] + }.Build(); + + device.State.Returns(Plugin.BLE.Abstractions.DeviceState.Connected); + device.GetServiceAsync(Arg.Any(), Arg.Any()).Returns(Task.FromResult(lockControl)); + lockControl.GetCharacteristicAsync(Arg.Any()).Returns(Task.FromResult(auth)); + auth.WriteAsync(Arg.Any()).Returns(Task.FromResult(true)); // Write COPRI seed to lock + auth.ReadAsync(Arg.Any()).Returns(Task.FromResult(new byte[8])); // Read lock seed + cipher.Decrypt(Arg.Any(), Arg.Any()).Returns(new byte[3]); + cipher.Encrypt(Arg.Any(), Arg.Any()).Returns(new byte[16]); + auth.WriteAsync(Arg.Any()).Returns(Task.FromResult(true)); // Write COPRI seed to lock + + device.Name.Returns("Origin"); + + Assert.AreEqual( + "Origin", + LockItEventBased.Authenticate(device, authTdo, adapter, cipher).Result.Name, + "If connected no auth is requied."); + } + + [Test] + public void TestAuth() + { + var authTdo = new LockInfoAuthTdo.Builder + { + Id = 12, + K_seed = new byte[] { (byte)'c', (byte)'b', (byte)'z', (byte)'b', (byte)'y', (byte)'I', (byte)'q', (byte)'j', (byte)'v', (byte)'L', (byte)'V', (byte)'I', (byte)'t', (byte)'C', (byte)'B', (byte)'I' }, + K_u = new byte[16] + }.Build(); + + var device = Substitute.For(); + var adapter = Substitute.For(); + var cipher = Substitute.For(); + + // Use factory to create LockIt-object. + var exception = Assert.Throws( + () => { var lockIt = LockItEventBased.Authenticate(device, authTdo, adapter, cipher).Result; }, + "If connected no auth is requied."); + + Assert.That(exception.InnerExceptions.Count > 0); + Assert.That(exception.InnerExceptions[0], Is.InstanceOf()); + } } } diff --git a/TestLockItBLE/TestLockItBLE.csproj b/TestLockItBLE/TestLockItBLE.csproj index 45586e9..73c0822 100644 --- a/TestLockItBLE/TestLockItBLE.csproj +++ b/TestLockItBLE/TestLockItBLE.csproj @@ -12,7 +12,7 @@ - + diff --git a/TestLockItShared/TestLockItShared.csproj b/TestLockItShared/TestLockItShared.csproj index 14a625e..be93a72 100644 --- a/TestLockItShared/TestLockItShared.csproj +++ b/TestLockItShared/TestLockItShared.csproj @@ -13,7 +13,7 @@ - + diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikeViewModel.cs b/TestShareeLib/Model/Bikes/BikeInfoNS/BC/TestBikeViewModel.cs similarity index 100% rename from TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikeViewModel.cs rename to TestShareeLib/Model/Bikes/BikeInfoNS/BC/TestBikeViewModel.cs diff --git a/TestShareeLib/Model/Bikes/BikeInfoNS/BluetoothLock/TestLockInfoMutable.cs b/TestShareeLib/Model/Bikes/BikeInfoNS/BluetoothLock/TestLockInfoMutable.cs index 8de966b..c374136 100644 --- a/TestShareeLib/Model/Bikes/BikeInfoNS/BluetoothLock/TestLockInfoMutable.cs +++ b/TestShareeLib/Model/Bikes/BikeInfoNS/BluetoothLock/TestLockInfoMutable.cs @@ -1,7 +1,8 @@ -using System; +using System; using System.Linq; using NUnit.Framework; using TINK.Model.Bikes.BikeInfoNS.BluetoothLock; +using TINK.Services.Geolocation; namespace TestTINKLib.Fixtures.ObjectTests.Bike.BluetoothLock { @@ -62,5 +63,60 @@ namespace TestTINKLib.Fixtures.ObjectTests.Bike.BluetoothLock Assert.IsTrue((new byte[] { 1, 12 }).SequenceEqual(lockInfo.Seed)); Assert.AreEqual(LockingState.Closed, lockInfo.State); } + + [Test] + public void TestLastLockingStateChange() + => Assert.That( + new LockInfoMutable(1, new Guid(), null, null, null, LockingState.Open, () => new DateTime(2023, 03, 13)).LastLockingStateChange, + Is.Null); + + [Test] + public void TestLastLockingStateChangeCangeCtor() + { + var lockInfo = new LockInfoMutable(1, new Guid(), null, null, null, LockingState.Open, () => new DateTime(2023, 03, 13)); + + lockInfo.State = LockingState.Closed; + + Assert.That( + lockInfo.LastLockingStateChange, + Is.EqualTo(new DateTime(2023, 03, 13))); + } + + [Test] + public void TestLocationCtor() + => Assert.That( + new LockInfoMutable(1, new Guid(), null, null, null, LockingState.Open, () => new DateTime(2023, 03, 13)).Location, + Is.Null); + + [Test] + public void TestLocation() + { + var lockInfo = new LockInfoMutable(1, new Guid(), null, null, null, LockingState.Open, () => new DateTime(2023, 03, 13)); + + lockInfo.Location = new Geolocation.Builder { Latitude = 47.99, Longitude = 7.78}.Build(); + + // Veryfy that location is kept because bike might be returned later. + Assert.That( + lockInfo.Location.Latitude, + Is.EqualTo(47.99).Within(0.001)); + Assert.That( + lockInfo.Location.Longitude, + Is.EqualTo(7.78).Within(0.001)); + } + + [Test] + public void TestLocationStateChange() + { + var lockInfo = new LockInfoMutable(1, new Guid(), null, null, null, LockingState.Open, () => new DateTime(2023, 03, 13)); + + lockInfo.Location = new Geolocation.Builder { Latitude = 47.99, Longitude = 7.78 }.Build(); + + lockInfo.State = LockingState.Closed; + + // Veryfy that location is kept because bike might be returned later. + Assert.That( + lockInfo.Location, + Is.Null); + } } } diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestCachedQuery.cs b/TestShareeLib/Model/Connector/TestCachedQuery.cs similarity index 78% rename from TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestCachedQuery.cs rename to TestShareeLib/Model/Connector/TestCachedQuery.cs index 5df88fa..be9aa5c 100644 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestCachedQuery.cs +++ b/TestShareeLib/Model/Connector/TestCachedQuery.cs @@ -1,7 +1,7 @@ -using System.Threading.Tasks; +using System.Threading.Tasks; using Newtonsoft.Json; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Connector; using TINK.Model.Services.CopriApi; using TINK.Repository; @@ -87,15 +87,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector.Query [Test] public async Task TestGetStations_StationsFromCache() { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( + var server = Substitute.For(); + server.GetStations(false).Returns(Task.Run(() => new Result( typeof(CopriCallsMonkeyStore), JsonConvert.DeserializeObject(STATIONSALL), new GeneralData(), new System.Exception("Bang when getting stations...")))); - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( + server.GetBikesAvailable(true).Returns(Task.Run(() => new Result( typeof(CopriCallsMonkeyStore), JsonConvert.DeserializeObject(BIKESAVAILABLE), new GeneralData()))); @@ -111,20 +110,20 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector.Query [Test] public async Task TestGetStations_BikesAvailableFromCache() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( + server.GetStations(false).Returns(Task.Run(() => new Result( typeof(CopriCallsHttps), JsonConvert.DeserializeObject(STATIONSALLEMPTY), new GeneralData()))); - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( + server.GetBikesAvailable(false).Returns(Task.Run(() => new Result( typeof(CopriCallsMonkeyStore), JsonConvert.DeserializeObject(BIKESAVAILABLE), new GeneralData(), new System.Exception("Bang when getting bikes...")))); - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( + server.GetStations(true).Returns(Task.Run(() => new Result( typeof(CopriCallsMonkeyStore), JsonConvert.DeserializeObject(STATIONSALL), new GeneralData()))); @@ -141,21 +140,18 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector.Query [Test] public async Task TestGetStations() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( + server.GetStations(false).Returns(Task.Run(() => new Result( typeof(CopriCallsHttps), JsonConvert.DeserializeObject(STATIONSALL), new GeneralData()))); - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( + server.GetBikesAvailable(false).Returns(Task.Run(() => new Result( typeof(CopriCallsHttps), JsonConvert.DeserializeObject(BIKESAVAILABLE), new GeneralData()))); - server.Stub(x => x.AddToCache(Arg>.Is.Anything)); - server.Stub(x => x.AddToCache(Arg>.Is.Anything)); - var result = await new CachedQuery(server).GetBikesAndStationsAsync(); Assert.AreEqual(3, result.Response.StationsAll.Count); @@ -167,15 +163,13 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector.Query [Test] public async Task TestGetBikes() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetBikesAvailable()).Return(Task.Run(() => new Result( + server.GetBikesAvailable().Returns(Task.Run(() => new Result( typeof(CopriCallsHttps), JsonConvert.DeserializeObject(BIKESAVAILABLE), new GeneralData()))); - server.Stub(x => x.AddToCache(Arg>.Is.Anything)); - var result = await new CachedQuery(server).GetBikesAsync(); Assert.AreEqual(1, result.Response.Count); @@ -186,7 +180,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector.Query [Test] public async Task TestGetBikesOccupied() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); var result = await new CachedQuery(server).GetBikesOccupiedAsync(); diff --git a/TestShareeLib/Model/Connector/TestCachedQueryLoggedIn.cs b/TestShareeLib/Model/Connector/TestCachedQueryLoggedIn.cs index d828e2a..29f4ea4 100644 --- a/TestShareeLib/Model/Connector/TestCachedQueryLoggedIn.cs +++ b/TestShareeLib/Model/Connector/TestCachedQueryLoggedIn.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Newtonsoft.Json; using NSubstitute; @@ -294,5 +294,346 @@ namespace TestShareeLib.Model.Connector bikesResponse.Response.Count, Is.EqualTo(1)); } + + private const string BIKESAVAILABLE = @"{ + ""copri_version"" : ""4.1.0.0"", + ""bikes"" : {}, + ""response_state"" : ""OK"", + ""apiserver"" : ""https://app.tink-konstanz.de"", + ""authcookie"" : """", + ""response"" : ""bikes_available"", + ""bikes"" : { + ""2352"" : { + ""description"" : ""Cargo Long"", + ""state"" : ""available"", + ""bike"" : ""1"", + ""gps"" : { ""latitude"": ""47.669888"", ""longitude"": ""9.167749"" }, + ""station"" : ""9"" + } + } + }"; + + private const string BIKESAVAILABLEEMPTY = @"{ + ""copri_version"" : ""4.1.0.0"", + ""bikes"" : {}, + ""response_state"" : ""OK"", + ""apiserver"" : ""https://app.tink-konstanz.de"", + ""authcookie"" : """", + ""response"" : ""bikes_available"", + ""bikes"" : { + } + }"; + + private const string BIKESOCCUPIED = @"{ + ""authcookie"" : ""6103_f782a208d9399291ba8d086b5dcc2509_12345678"", + ""debuglevel"" : ""2"", + ""user_group"" : [ ""TINK"" ], + ""user_id"" : ""javaminister@gmail.com"", + ""response"" : ""user_bikes_occupied"", + ""response_state"" : ""OK"", + ""response_text"" : ""Die Liste der reservierten und gebuchten Fahrräder wurde erfolgreich geladen"", + ""apiserver"" : ""https://tinkwwp.copri-bike.de"", + ""bikes_occupied"" : { + ""89004"" : { + ""start_time"" : ""2018-01-27 17:33:00.989464+01"", + ""station"" : ""9"", + ""unit_price"" : ""2.00"", + ""tariff_description"": { + ""free_hours"" : ""0.5"", + ""name"" : ""TINK Tarif"", + ""max_eur_per_day"" : ""9.00"" + }, + ""timeCode"" : ""2061"", + ""description"" : ""Cargo Long"", + ""bike"" : ""4"", + ""total_price"" : ""20.00"", + ""state"" : ""requested"", + ""real_hours"" : ""66.05"", + ""bike_group"" : [ ""TINK"" ], + ""now_time"" : ""2018-01-30 11:36:45"", + ""request_time"" : ""2018-01-27 17:33:00.989464+01"", + ""computed_hours"" : ""10.0"" + } + } + }"; + + private const string STATIONSALL = @"{ + ""copri_version"" : ""4.1.0.0"", + ""stations"" : { + ""5"" : { + ""station"" : ""5"", + ""bike_soll"" : ""0"", + ""bike_ist"" : ""7"", + ""station_group"" : [ ""TINK"" ], + ""gps"" : { ""latitude"": ""47.66756"", ""longitude"": ""9.16477"" }, + ""state"" : ""available"", + ""description"" : """" + }, + ""13"" : { + ""station"" : ""13"", + ""bike_soll"" : ""4"", + ""bike_ist"" : ""1"", + ""station_group"" : [ ""TINK"" ], + ""gps"" : { ""latitude"": ""47.657756"", ""longitude"": ""9.176084"" }, + ""state"" : ""available"", + ""description"" : """" + }, + ""30"" : { + ""station"" : ""30"", + ""bike_soll"" : ""5"", + ""bike_ist"" : ""0"", + ""station_group"" : [ ""TINK"", ""Konrad"" ], + ""gps"" : { ""latitude"": ""47.657766"", ""longitude"": ""9.176094"" }, + ""state"" : ""available"", + ""description"" : ""Test für Stadtradstation"" + } + }, + ""user_group"" : [ ""Konrad"", ""TINK"" ], + ""response_state"" : ""OK"", + ""authcookie"" : ""6103_f782a208d9399291ba8d086b5dcc2509_12345678"", + ""debuglevel"" : ""2"", + ""response"" : ""stations_all"", + ""user_id"" : ""javaminister@gmail.com"", + ""apiserver"" : ""https://tinkwwp.copri-bike.de"" + }"; + + private const string STATIONSALLEMPTY = @"{ + ""copri_version"" : ""4.1.0.0"", + ""stations"" : { + }, + ""user_group"" : [ ""Konrad"", ""TINK"" ], + ""response_state"" : ""OK"", + ""authcookie"" : ""6103_f782a208d9399291ba8d086b5dcc2509_12345678"", + ""debuglevel"" : ""2"", + ""response"" : ""stations_all"", + ""user_id"" : ""javaminister@gmail.com"", + ""apiserver"" : ""https://tinkwwp.copri-bike.de"" + }"; + + [Test] + public async Task TestGetStations_StationsFromCache() + { + var server = Substitute.For(); + + server.GetStations(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(STATIONSALL), + new GeneralData(), + new System.Exception("Bang when getting stations...")))); + + server.GetBikesAvailable(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData()))); + + server.GetBikesOccupied(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); + + Assert.AreEqual(3, result.Response.StationsAll.Count); + Assert.AreEqual(2, result.Response.Bikes.Count); + Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); + Assert.AreEqual("Bang when getting stations...", result.Exception.Message); + } + + [Test] + public async Task TestGetStations_BikesAvailableFromCache() + { + var server = Substitute.For(); + + server.GetStations(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(STATIONSALLEMPTY), + new GeneralData()))); + + server.GetBikesAvailable(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData(), + new System.Exception("Bang when getting bikes...")))); + + server.GetBikesOccupied(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData()))); + + server.GetStations(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(STATIONSALL), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); + + Assert.AreEqual(3, result.Response.StationsAll.Count); + Assert.AreEqual(2, result.Response.Bikes.Count); + Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); + Assert.AreEqual("Bang when getting bikes...", result.Exception.Message); + } + + [Test] + public async Task TestGetStations_BikesOccupiedFromCache() + { + var server = Substitute.For(); + + server.GetStations(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(STATIONSALLEMPTY), + new GeneralData()))); + + server.GetBikesAvailable(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESAVAILABLEEMPTY), + new GeneralData()))); + + server.GetBikesOccupied(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData(), + new System.Exception("Bang when getting bikes occupied...")))); + + server.GetBikesAvailable(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData()))); + + server.GetStations(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(STATIONSALL), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); + + Assert.AreEqual(3, result.Response.StationsAll.Count); + Assert.AreEqual(2, result.Response.Bikes.Count); + Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); + Assert.AreEqual("Bang when getting bikes occupied...", result.Exception.Message); + } + + [Test] + public async Task TestGetStations() + { + var server = Substitute.For(); + + server.GetStations(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(STATIONSALL), + new GeneralData()))); + + server.GetBikesAvailable(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData()))); + + server.GetBikesOccupied(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); + + Assert.AreEqual(3, result.Response.StationsAll.Count); + Assert.AreEqual(2, result.Response.Bikes.Count); + Assert.AreEqual(typeof(CopriCallsHttps), result.Source); + Assert.IsNull(result.Exception); + } + + [Test] + public async Task TestGetBikes_BikesAvailableFromCache() + { + var server = Substitute.For(); + + server.GetBikesAvailable().Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData(), + new System.Exception("Bang, bikes avail...")))); + + server.GetBikesOccupied(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); + + Assert.AreEqual(2, result.Response.Count); + Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); + Assert.AreEqual("Bang, bikes avail...", result.Exception.Message); + } + + [Test] + public async Task TestGetBikes_BikesOccupiedFromCache() + { + var server = Substitute.For(); + + server.GetBikesAvailable(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESAVAILABLEEMPTY), + new GeneralData()))); + + server.GetBikesOccupied(false).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData(), + new System.Exception("Bang, error bikes occupied")))); + + server.GetBikesAvailable(true).Returns(Task.Run(() => new Result( + typeof(CopriCallsMonkeyStore), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); + + Assert.AreEqual(2, result.Response.Count); + Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); + Assert.AreEqual("Bang, error bikes occupied", result.Exception.Message); + } + + [Test] + public async Task TestGetBikes() + { + var server = Substitute.For(); + + server.GetBikesAvailable().Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESAVAILABLE), + new GeneralData()))); + + server.GetBikesOccupied().Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); + + Assert.AreEqual(2, result.Response.Count); + Assert.AreEqual(typeof(CopriCallsHttps), result.Source); + Assert.IsNull(result.Exception); + } + + [Test] + public async Task TestGetBikesOccupied() + { + var server = Substitute.For(); + + server.GetBikesAvailable().Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject("{}"), + new GeneralData()))); + + server.GetBikesOccupied().Returns(Task.Run(() => new Result( + typeof(CopriCallsHttps), + JsonConvert.DeserializeObject(BIKESOCCUPIED), + new GeneralData()))); + + var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesOccupiedAsync(); + + Assert.AreEqual(1, result.Response.Count); + Assert.AreEqual(typeof(CopriCallsHttps), result.Source); + Assert.IsNull(result.Exception); + } + } } diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/TestCommandLoggedIn.cs b/TestShareeLib/Model/Connector/TestCommandLoggedIn.cs similarity index 72% rename from TestTINKLib/Fixtures/ObjectTests/Connector/TestCommandLoggedIn.cs rename to TestShareeLib/Model/Connector/TestCommandLoggedIn.cs index 94c9b57..211005e 100644 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/TestCommandLoggedIn.cs +++ b/TestShareeLib/Model/Connector/TestCommandLoggedIn.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Threading.Tasks; using Newtonsoft.Json; +using NSubstitute; +using NSubstitute.ReceivedExtensions; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Connector; using TINK.Repository; using TINK.Repository.Exception; @@ -17,9 +18,9 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestDoLogout() { - var l_oServer = MockRepository.GenerateStub(); + var l_oServer = Substitute.For(); - l_oServer.Stub(x => x.DoAuthoutAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject("{ \"response_state\" : \"OK\", \"authcookie\" : \"1\"}"))); + l_oServer.DoAuthoutAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject("{ \"response_state\" : \"OK\", \"authcookie\" : \"1\"}"))); var l_oCmd = new CommandLoggedIn(l_oServer, "MeinKeks", "EMehl", () => DateTime.Now); @@ -28,7 +29,8 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector l_oCmd.DoLogout().Wait(); - l_oServer.AssertWasCalled(x => x.DoAuthoutAsync()); + + l_oServer.Received().DoAuthoutAsync(); Assert.IsNotNull(l_oEventArgs); } @@ -36,9 +38,9 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestDoLogout_AuthcookieNotDefined() { - var l_oServer = MockRepository.GenerateStub(); + var l_oServer = Substitute.For(); - l_oServer.Stub(x => x.DoAuthoutAsync()).Throw(new AuthcookieNotDefinedException("Testing action", JsonConvert.DeserializeObject(@"{ ""response_state"" : ""Some inner error description""}"))); + l_oServer.When(x => x.DoAuthoutAsync()).Throw(new AuthcookieNotDefinedException("Testing action", JsonConvert.DeserializeObject(@"{ ""response_state"" : ""Some inner error description""}"))); var l_oCmd = new CommandLoggedIn(l_oServer, "MeinKeks", "EMehl", () => DateTime.Now); @@ -47,7 +49,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector l_oCmd.DoLogout().Wait(); - l_oServer.AssertWasCalled(x => x.DoAuthoutAsync()); + l_oServer.Received().DoAuthoutAsync(); Assert.IsNotNull(l_oEventArgs); } @@ -55,9 +57,9 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestDoLogout_Exception() { - var l_oServer = MockRepository.GenerateStub(); + var l_oServer = Substitute.For(); - l_oServer.Stub(x => x.DoAuthoutAsync()).Throw(new System.Exception("Sometheing went wrong.")); + l_oServer.When(x => x.DoAuthoutAsync()).Throw(new System.Exception("Sometheing went wrong.")); var l_oCmd = new CommandLoggedIn(l_oServer, "MeinKeks", "EMehl", () => DateTime.Now); @@ -66,7 +68,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector Assert.Throws(() => l_oCmd.DoLogout().Wait()); - l_oServer.AssertWasCalled(x => x.DoAuthoutAsync()); + l_oServer.Received().DoAuthoutAsync(); Assert.IsNull(l_oEventArgs); } } diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/TestConnector.cs b/TestShareeLib/Model/Connector/TestConnector.cs similarity index 87% rename from TestTINKLib/Fixtures/ObjectTests/Connector/TestConnector.cs rename to TestShareeLib/Model/Connector/TestConnector.cs index dd697bf..0a387ca 100644 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/TestConnector.cs +++ b/TestShareeLib/Model/Connector/TestConnector.cs @@ -1,6 +1,6 @@ -using System; +using System; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Connector; using TINK.Model.Services.CopriApi; using TINK.Repository; @@ -16,7 +16,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestCommandFactory() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); // Construct not logged in version of connector. var l_oCommand = new TINK.Model.Connector.Connector( @@ -36,7 +36,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestCommandFactory_LoggedIn() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); var l_oCommand = new TINK.Model.Connector.Connector( new System.Uri("http://1.2.3.4"), @@ -55,7 +55,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestQueryFactory_CachedServer() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); var l_oQuery = new TINK.Model.Connector.Connector( new Uri("http://1.2.3.4"), @@ -74,7 +74,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestQueryFactory_LoggedIn() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); var l_oQuery = new TINK.Model.Connector.Connector( new System.Uri("http://1.2.3.4"), diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/TestConnectorCache.cs b/TestShareeLib/Model/Connector/TestConnectorCache.cs similarity index 88% rename from TestTINKLib/Fixtures/ObjectTests/Connector/TestConnectorCache.cs rename to TestShareeLib/Model/Connector/TestConnectorCache.cs index 756f064..e76c486 100644 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/TestConnectorCache.cs +++ b/TestShareeLib/Model/Connector/TestConnectorCache.cs @@ -1,6 +1,6 @@ using System; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Connector; using TINK.Repository; @@ -15,7 +15,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestCommandFactory() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); // Construct not logged in version of connector. var l_oCommand = new ConnectorCache( @@ -34,7 +34,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestCommandFactory_LoggedIn() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); var l_oCommand = new ConnectorCache( new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2)), @@ -52,7 +52,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestQueryFactory_CachedServer() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); var l_oQuery = new ConnectorCache( new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2)), @@ -70,7 +70,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public void TestQueryFactory_LoggedIn() { - var l_oCopri = MockRepository.GenerateStub(); + var l_oCopri = Substitute.For(); var l_oQuery = new ConnectorCache( new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2)), diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/TestCopriCallsStatic.cs b/TestShareeLib/Model/Connector/TestCopriCallsStatic.cs similarity index 100% rename from TestTINKLib/Fixtures/ObjectTests/Connector/TestCopriCallsStatic.cs rename to TestShareeLib/Model/Connector/TestCopriCallsStatic.cs diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestQuery.cs b/TestShareeLib/Model/Connector/TestQuery.cs similarity index 84% rename from TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestQuery.cs rename to TestShareeLib/Model/Connector/TestQuery.cs index 6240d88..4c8ca7d 100644 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestQuery.cs +++ b/TestShareeLib/Model/Connector/TestQuery.cs @@ -1,7 +1,7 @@ -using System.Threading.Tasks; +using System.Threading.Tasks; using Newtonsoft.Json; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Repository; using TINK.Repository.Response; @@ -71,10 +71,10 @@ namespace TestTINKLib.Fixtures.ObjectTests.Query [Test] public async Task TestGetStations() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetStationsAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(STATIONSALL))); - server.Stub(x => x.GetBikesAvailableAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); + server.GetStationsAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(STATIONSALL))); + server.GetBikesAvailableAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); var result = await new TINK.Model.Connector.Query(server).GetBikesAndStationsAsync(); @@ -87,9 +87,9 @@ namespace TestTINKLib.Fixtures.ObjectTests.Query [Test] public async Task TestGetBikes() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetBikesAvailableAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); + server.GetBikesAvailableAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); var result = await new TINK.Model.Connector.Query(server).GetBikesAsync(); @@ -101,7 +101,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Query [Test] public async Task TestGetBikesOccupied() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); var result = await new TINK.Model.Connector.Query(server).GetBikesOccupiedAsync(); diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestQueryLoggedIn.cs b/TestShareeLib/Model/Connector/TestQueryLoggedIn.cs similarity index 86% rename from TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestQueryLoggedIn.cs rename to TestShareeLib/Model/Connector/TestQueryLoggedIn.cs index fa1b40f..2429242 100644 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestQueryLoggedIn.cs +++ b/TestShareeLib/Model/Connector/TestQueryLoggedIn.cs @@ -1,9 +1,8 @@ -using System; +using System; using System.Threading.Tasks; using Newtonsoft.Json; using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Connector; using TINK.Repository; using TINK.Repository.Response; @@ -108,11 +107,11 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public async Task TestGetStations() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetStationsAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(STATIONSALL))); - server.Stub(x => x.GetBikesAvailableAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); - server.Stub(x => x.GetBikesOccupiedAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(BIKESOCCUPIED))); + server.GetStationsAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(STATIONSALL))); + server.GetBikesAvailableAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); + server.GetBikesOccupiedAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(BIKESOCCUPIED))); var result = await new QueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); @@ -125,10 +124,10 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector [Test] public async Task TestGetBikes() { - var server = MockRepository.GenerateMock(); + var server = Substitute.For(); - server.Stub(x => x.GetBikesAvailableAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); - server.Stub(x => x.GetBikesOccupiedAsync()).Return(Task.Run(() => JsonConvert.DeserializeObject(BIKESOCCUPIED))); + server.GetBikesAvailableAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(BIKESAVAILABLE))); + server.GetBikesOccupiedAsync().Returns(Task.Run(() => JsonConvert.DeserializeObject(BIKESOCCUPIED))); var result = await new QueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); diff --git a/TestTINKLib/Fixtures/ObjectTests/State/TestStateInfoMutable.cs b/TestShareeLib/Model/State/TestStateInfoMutable.cs similarity index 89% rename from TestTINKLib/Fixtures/ObjectTests/State/TestStateInfoMutable.cs rename to TestShareeLib/Model/State/TestStateInfoMutable.cs index e83afd0..ea99a22 100644 --- a/TestTINKLib/Fixtures/ObjectTests/State/TestStateInfoMutable.cs +++ b/TestShareeLib/Model/State/TestStateInfoMutable.cs @@ -1,7 +1,7 @@ -using System; +using System; using System.Collections.Generic; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.State; @@ -28,8 +28,8 @@ namespace TestTINKLib public void TestConstructCopy() { // State is available. - var l_oSource = MockRepository.GenerateStub(); - l_oSource.Stub(x => x.Value).Return(InUseStateEnum.Disposable); + var l_oSource = Substitute.For(); + l_oSource.Value.Returns(InUseStateEnum.Disposable); var l_oState = new StateInfoMutable(state: l_oSource); @@ -39,11 +39,11 @@ namespace TestTINKLib Assert.IsNull(l_oState.Code); // State is requested. - l_oSource = MockRepository.GenerateStub(); - l_oSource.Stub(x => x.Value).Return(InUseStateEnum.Reserved); - l_oSource.Stub(x => x.From).Return(new DateTime(2018, 1, 4, 17, 26, 0)); - l_oSource.Stub(x => x.MailAddress).Return("who@the"); - l_oSource.Stub(x => x.Code).Return("323"); + l_oSource = Substitute.For(); + l_oSource.Value.Returns(InUseStateEnum.Reserved); + l_oSource.From.Returns(new DateTime(2018, 1, 4, 17, 26, 0)); + l_oSource.MailAddress.Returns("who@the"); + l_oSource.Code.Returns("323"); l_oState = new StateInfoMutable(() => new DateTime(2018, 1, 4, 17, 30, 1), l_oSource); @@ -54,11 +54,11 @@ namespace TestTINKLib Assert.AreEqual("323", l_oState.Code); // State is booked. - l_oSource = MockRepository.GenerateStub(); - l_oSource.Stub(x => x.Value).Return(InUseStateEnum.Booked); - l_oSource.Stub(x => x.From).Return(new DateTime(2018, 1, 4, 17, 00, 0)); - l_oSource.Stub(x => x.MailAddress).Return("who@the"); - l_oSource.Stub(x => x.Code).Return("323"); + l_oSource = Substitute.For(); + l_oSource.Value.Returns(InUseStateEnum.Booked); + l_oSource.From.Returns(new DateTime(2018, 1, 4, 17, 00, 0)); + l_oSource.MailAddress.Returns("who@the"); + l_oSource.Code.Returns("323"); l_oState = new StateInfoMutable(() => new DateTime(2018, 1, 4, 17, 30, 1), l_oSource); @@ -185,4 +185,4 @@ namespace TestTINKLib Assert.IsNull(l_oState.Code); } } -} \ No newline at end of file +} diff --git a/TestTINKLib/Fixtures/ObjectTests/State/TestStateRequestedInfo.cs b/TestShareeLib/Model/State/TestStateRequestedInfo.cs similarity index 100% rename from TestTINKLib/Fixtures/ObjectTests/State/TestStateRequestedInfo.cs rename to TestShareeLib/Model/State/TestStateRequestedInfo.cs diff --git a/TestShareeLib/Model/TestTinkAppLogin.cs b/TestShareeLib/Model/TestTinkAppLogin.cs index 59c62f4..c0749e2 100644 --- a/TestShareeLib/Model/TestTinkAppLogin.cs +++ b/TestShareeLib/Model/TestTinkAppLogin.cs @@ -43,7 +43,7 @@ namespace TestShareeLib.UseCases.Login merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: permissions, - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: device, specialFolder: specialFolder, diff --git a/TestShareeLib/Model/TestTinkApp.cs b/TestShareeLib/Model/TestTinkAppLogout.cs similarity index 99% rename from TestShareeLib/Model/TestTinkApp.cs rename to TestShareeLib/Model/TestTinkAppLogout.cs index da0c757..d81b1a4 100644 --- a/TestShareeLib/Model/TestTinkApp.cs +++ b/TestShareeLib/Model/TestTinkAppLogout.cs @@ -48,7 +48,7 @@ namespace TestTINKLib.Fixtures.UseCases.Logout merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: permissions, - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: device, specialFolder: specialFolder, diff --git a/TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs b/TestShareeLib/Model/TestTinkAppSelectStation.cs similarity index 60% rename from TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs rename to TestShareeLib/Model/TestTinkAppSelectStation.cs index a6f16d2..4fd3876 100644 --- a/TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs +++ b/TestShareeLib/Model/TestTinkAppSelectStation.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using NSubstitute; using NUnit.Framework; using Plugin.BLE.Abstractions.Contracts; @@ -8,8 +9,11 @@ using TestFramework.Model.Services.Geolocation; using TestFramework.Model.User.Account; using TestFramework.Services.BluetoothLock; using TINK.Model; +using TINK.Model.Bikes; using TINK.Model.Connector; using TINK.Model.Settings; +using TINK.Model.Station; +using TINK.Model.User; using TINK.Repository; using TINK.Services; using TINK.Services.Geolocation; @@ -23,6 +27,24 @@ namespace TestTINKLib.Fixtures.UseCases.SelectStation [TestFixture] public class TestTinkApp { + /// + /// Get all bikes at a given station from copri. + /// + private static async Task GetBikesAtStation( + User user, + TINK.Model.Connector.IConnector connector, + IEnumerable stations, + string selectedStationId) + { + var l_oBikesAtStation = new BikeCollectionMutable(); + + var l_oBikesAvailable = (await connector.Query.GetBikesAsync()).Response; + + l_oBikesAtStation.Update(l_oBikesAvailable.GetAtStation(selectedStationId), stations); + + return l_oBikesAtStation; + } + [Test] public void TestBikesAtStation_AccountStoreMock_NoUser_CopriMock_Set2() { @@ -51,7 +73,7 @@ namespace TestTINKLib.Fixtures.UseCases.SelectStation merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -60,25 +82,25 @@ namespace TestTINKLib.Fixtures.UseCases.SelectStation currentVersion: new Version(3, 2, 0, 115), lastVersion: new Version(3, 0, 173)); // Current app version. Must be larger or equal 3.0.173 to - Assert.AreEqual(0, TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); + Assert.AreEqual(0, GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); l_oTinkApp.SelectedStation = new TINK.Model.Station.Station("5", new List(), null); - Assert.AreEqual(3, TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); - Assert.AreEqual("25", TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("25").Id); - Assert.AreEqual("11", TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("11").Id); - Assert.AreEqual("2", TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("2").Id); + Assert.AreEqual(3, GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); + Assert.AreEqual("25", GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("25").Id); + Assert.AreEqual("11", GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("11").Id); + Assert.AreEqual("2", GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("2").Id); l_oTinkApp.SelectedStation = new TINK.Model.Station.Station("10", new List(), null); Assert.AreEqual( 1, - TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); + GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); - Assert.AreEqual("18", TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("18").Id); + Assert.AreEqual("18", GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.GetById("18").Id); l_oTinkApp.SelectedStation = new TINK.Model.Station.Station("91345", new List(), null); - Assert.AreEqual(0, TestHelper.GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); + Assert.AreEqual(0, GetBikesAtStation(l_oTinkApp.ActiveUser, l_oConnector, l_oTinkApp.Stations, l_oTinkApp.SelectedStation.Id).Result.Count); } } } diff --git a/TestTINKLib/Fixtures/ObjectTests/User/Account/TestAccountExtensions.cs b/TestShareeLib/Model/User/Account/TestAccountExtensions.cs similarity index 65% rename from TestTINKLib/Fixtures/ObjectTests/User/Account/TestAccountExtensions.cs rename to TestShareeLib/Model/User/Account/TestAccountExtensions.cs index 25e71b0..74a77f8 100644 --- a/TestTINKLib/Fixtures/ObjectTests/User/Account/TestAccountExtensions.cs +++ b/TestShareeLib/Model/User/Account/TestAccountExtensions.cs @@ -1,7 +1,7 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Connector; using TINK.Model.User.Account; @@ -14,11 +14,11 @@ namespace TestTINKLib.Fixtures.ObjectTests.User.Account [Test] public void TestDoFilter_NoUserLoggedIn() { - var l_oAccount = MockRepository.GenerateMock(); + var l_oAccount = Substitute.For(); - l_oAccount.Stub((x) => x.Mail).Return("a@b"); - l_oAccount.Stub((x) => x.SessionCookie).Return(""); // User is not logged in - l_oAccount.Stub((x) => x.Group).Return(new List { $"HOM_{FilterHelper.CARGOBIKE}", "HOM_117025" }); + l_oAccount.Mail.Returns("a@b"); + l_oAccount.SessionCookie.Returns(""); // User is not logged in + l_oAccount.Group.Returns(new List { $"HOM_{FilterHelper.CARGOBIKE}", "HOM_117025" }); var l_oSource = new List { $"HOM_{FilterHelper.CARGOBIKE}", $"HOM_{FilterHelper.CITYBIKE}", "HOM_117025" }; @@ -33,11 +33,11 @@ namespace TestTINKLib.Fixtures.ObjectTests.User.Account [Test] public void TestDoFilter() { - var l_oAccount = MockRepository.GenerateMock(); + var l_oAccount = Substitute.For(); - l_oAccount.Stub((x) => x.Mail).Return("a@b"); - l_oAccount.Stub((x) => x.SessionCookie).Return("123"); - l_oAccount.Stub((x) => x.Group).Return(new List { $"HOM_{FilterHelper.CARGOBIKE}", "HOM_117025" }); + l_oAccount.Mail.Returns("a@b"); + l_oAccount.SessionCookie.Returns("123"); + l_oAccount.Group.Returns(new List { $"HOM_{FilterHelper.CARGOBIKE}", "HOM_117025" }); var l_oSource = new List { $"HOM_{FilterHelper.CARGOBIKE}", $"HOM_{FilterHelper.CITYBIKE}", "HOM_117025" }; diff --git a/TestShareeLib/Repository/TestCopriCallsMemory.cs.cs b/TestShareeLib/Repository/TestCopriCallsMemory.cs.cs index 36c112f..f56c333 100644 --- a/TestShareeLib/Repository/TestCopriCallsMemory.cs.cs +++ b/TestShareeLib/Repository/TestCopriCallsMemory.cs.cs @@ -26,11 +26,11 @@ namespace TestTINKLib.Fixtures.Connector.Request Assert.IsNull( l_oCopri.GetBikesAvailableAsync().Result.bikes.Values.FirstOrDefault(x => x.state != "available"), - "Bikes available must return bikes which are all of state available."); + "Bikes available must end rentals which are all of state available."); Assert.IsNull( l_oCopri.GetBikesOccupiedAsync().Result.bikes_occupied.Values.FirstOrDefault(x => x.state == "available"), - "Bikes occupied must return bikes which are either reserved or booked."); + "Bikes occupied must end rentals which are either reserved or booked."); } } } diff --git a/TestShareeLib/Repository/TestCopriCallsStatic.cs b/TestShareeLib/Repository/TestCopriCallsStatic.cs index 7ba44f6..fc7e6b1 100644 --- a/TestShareeLib/Repository/TestCopriCallsStatic.cs +++ b/TestShareeLib/Repository/TestCopriCallsStatic.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using System.Linq; +using Newtonsoft.Json; using NUnit.Framework; using TINK.Repository; using TINK.Repository.Response; @@ -82,5 +83,158 @@ namespace TestShareeLib.Repository () => response.DeserializeResponse(version => new System.Exception("Ho")).copri_version, Throws.InstanceOf()); } + + [Test] + public void TestDeserializeObjectBikesAvailableValidResponse() + { + const string VALID_RESPONSE = @" + { + ""shareejson"": { + + ""authcookie"": 0, + ""apiserver"": ""https://tinkwwp.copri-bike.de"", + ""response"": ""bikes_available"", + ""bikes"": { + ""3399"": { + ""description"": ""Cargo Trike"", + ""bike"": ""26"", + ""state"": ""available"", + ""gps"" : { ""latitude"": ""47.6586936667"", ""longitude"": ""9.16863116667"" }, + ""station"" : ""4"" + + }, + }, + ""response_state"": ""OK"", + ""copri_version"" : ""4.1.0.0"" + } + } + "; + + // Ensure that answer holds a valid bike. + var l_oBike = CopriCallsStatic.DeserializeResponse(VALID_RESPONSE).bikes.FirstOrDefault().Value; + Assert.NotNull(l_oBike, "Response must contain at leas one bike."); + Assert.Greater(l_oBike.description.Length, 0, "Bike despcription must never be empty."); + Assert.AreEqual(l_oBike.bike, "26"); + Assert.That( + l_oBike.station, + Is.EqualTo("4"), + "Station index must never be negative"); + Assert.AreEqual("available", l_oBike.state); + Assert.That(l_oBike.gps, Is.Not.Null, "Gps position must never be empty."); + } + + [Test] + public void TestDeserializeObjectBikesAvailableValidResponse_NoDescription() + { + const string INVALID_RESPONSE = @" + { + ""shareejson"": { + + ""authcookie"": 0, + ""apiserver"": ""https://tinkwwp.copri-bike.de"", + ""response"": ""bikes_available"", + ""bikes"": { + ""3399"": { + ""bike"": 26, + ""state"": ""available"", + ""gps"" : { ""latitude"": ""47.6586936667"", ""longitude"": ""9.16863116667"" }, + ""station"" : 4 + + }, + }, + ""response_state"": ""OK"", + ""copri_version"" : ""4.1.0.0"", + } + } + "; + + // Ensure that answer holds a valid bike. + var l_oBike = CopriCallsStatic.DeserializeResponse(INVALID_RESPONSE).bikes.FirstOrDefault().Value; + Assert.NotNull(l_oBike, "Response must contain at leas one bike."); + Assert.IsNull(l_oBike.description); + Assert.That(l_oBike.bike, Is.Not.Null); + Assert.That(l_oBike.station, Is.Not.Null); + Assert.AreEqual("available", l_oBike.state); + Assert.That(l_oBike.gps, Is.Not.Null, "Gps position must never be empty."); + } + + [Test] + public void TestDeserializeObjectBikesAvailableValidResponse_NoBikeId() + { + const string VALID_RESPONSE = @" + { + ""shareejson"": { + + ""authcookie"": 0, + ""apiserver"": ""https://tinkwwp.copri-bike.de"", + ""response"": ""bikes_available"", + ""bikes"": { + ""3399"": { + ""description"": ""Cargo Trike"", + ""state"": ""available"", + ""gps"" : { ""latitude"": ""47.6586936667"", ""longitude"": ""9.16863116667"" }, + ""station"" : ""4"" + }, + }, + ""response_state"": ""OK"", + ""copri_version"" : ""4.1.0.0"", + } + }"; + + // Ensure that answer holds a valid bike. + var l_oBike = CopriCallsStatic.DeserializeResponse(VALID_RESPONSE).bikes.FirstOrDefault().Value; + Assert.NotNull(l_oBike, "Response must contain at leas one bike."); + Assert.Greater(l_oBike.description.Length, 0, "Bike despcription must never be empty."); + Assert.That(l_oBike.bike, Is.Null); + Assert.That(l_oBike.station, Is.Not.Null); + Assert.AreEqual("available", l_oBike.state); + Assert.That(l_oBike.gps, Is.Not.Null, "Gps position must never be empty."); + } + + [Test] + public void TestDeserializeObjectBikesOccupiedValidResponse() + { + const string VALID_RESPONSE = @" + { + ""shareejson"": { + ""response_state"": ""OK"", + ""bikes_occupied"": { + ""87781"": { + ""timeCode"": ""3630"", + ""state"": ""occupied"", + ""station"" : ""5"", + ""description"": ""Cargo Long"", + ""start_time"": ""2017-11-28 11:01:51.637747+01"", + ""bike"": ""8"" + }, + ""87782"": { + ""timeCode"": ""2931"", + ""state"": ""occupied"", + ""station"" : ""4"", + ""description"": ""Cargo Long"", + ""start_time"": ""2017-11-28 13:06:55.147368+01"", + ""bike"": ""7"" + } + }, + ""authcookie"": ""b76b97e43a2d76b8499f32e6dd597af8"", + ""response"": ""user_bikes_occupied"", + ""apiserver"": ""https://tinkwwp.copri-bike.de"", + ""copri_version"" : ""4.1.0.0"", + } + }"; + + // Ensure that answer holds a valid bike. + var l_oBike = CopriCallsStatic.DeserializeResponse(VALID_RESPONSE).bikes_occupied.FirstOrDefault().Value; + Assert.NotNull(l_oBike, "Response must contain at leas one bike."); + Assert.Greater(l_oBike.description.Length, 0, "Bike despcription must never be empty."); + Assert.That(l_oBike.bike, Is.Not.Null); + Assert.That(l_oBike.station, Is.Not.Null); + Assert.Greater(l_oBike.state.Length, 0, "State info must never be null or empty."); + // Todo: Requested bikes do not have a gps position. What is about booked bikes? + // Assert.Greater(l_oBike.gps.Length, 0, "Gps position must never be empty."); + Assert.Greater(l_oBike.start_time.Length, 0, "Time when request/ booking was performed must never be null or empty."); + Assert.Greater(l_oBike.timeCode.Length, 0, "Booking code must never be null or empty."); + } + } } diff --git a/TestShareeLib/Services/TestServicesContainerMutable.cs b/TestShareeLib/Services/TestServicesContainerMutable.cs index 2a27fa2..764b759 100644 --- a/TestShareeLib/Services/TestServicesContainerMutable.cs +++ b/TestShareeLib/Services/TestServicesContainerMutable.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using NUnit.Framework; using TINK.Services; @@ -64,5 +64,35 @@ namespace TestShareeLib.Services private class MyTypeB { } private class MyTypeC { } + + [Test] + public void TestCtor2() + { + var container = new ServicesContainerMutableT(new List { new MyTypeA(), new MyTypeB() }, typeof(MyTypeB).FullName); + Assert.That(container.Active.GetType().FullName, Is.EqualTo("TestShareeLib.Services.TestServicesContainerMutable+MyTypeB")); + } + + [Test] + public void TestCtorExceptionDupes() + { + Assert.That(() => new ServicesContainerMutableT(new List { new MyTypeA(), new MyTypeB(), new MyTypeA() }, typeof(MyTypeB).FullName), Throws.InstanceOf()); + } + + [Test] + public void TestCtorExceptionActiveNotFound() + { + Assert.That(() => new ServicesContainerMutableT(new List { new MyTypeA(), new MyTypeB() }, "MyTypeF"), Throws.InstanceOf()); + } + + [Test] + public void TestSetActive2() + { + var container = new ServicesContainerMutableT(new List { new MyTypeA(), new MyTypeB() }, typeof(MyTypeB).FullName); + container.SetActive(typeof(MyTypeA).FullName); + Assert.That(container.Active.GetType().FullName, Is.EqualTo("TestShareeLib.Services.TestServicesContainerMutable+MyTypeA")); + } + + + } } diff --git a/TestShareeLib/TestShareeLib.csproj b/TestShareeLib/TestShareeLib.csproj index af849e3..46c2136 100644 --- a/TestShareeLib/TestShareeLib.csproj +++ b/TestShareeLib/TestShareeLib.csproj @@ -29,7 +29,7 @@ - + diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs b/TestShareeLib/ViewModel/Account/TestAccountPageViewModel.cs similarity index 96% rename from TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs rename to TestShareeLib/ViewModel/Account/TestAccountPageViewModel.cs index 462b2da..ad67e89 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs +++ b/TestShareeLib/ViewModel/Account/TestAccountPageViewModel.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using NSubstitute; using NUnit.Framework; using Plugin.BLE.Abstractions.Contracts; -using Rhino.Mocks; using TestFramework.Model.Device; using TestFramework.Model.Services.Geolocation; using TestFramework.Model.User.Account; @@ -51,7 +50,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -62,7 +61,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account lastVersion: new Version(3, 0, 173), // Current app version. Must be larger or equal 3.0.173 to whatsNewShownInVersion: null); // Whats new page was never shown. - var viewService = MockRepository.GenerateStub(); + var viewService = Substitute.For(); var settingsPageViewModel = new AccountPageViewModel( tinkApp, @@ -96,7 +95,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -107,7 +106,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account lastVersion: new Version(3, 0, 173), // Current app version. Must be larger or equal 3.0.173 to whatsNewShownInVersion: null); // Whats new page was never shown. - var viewService = MockRepository.GenerateStub(); + var viewService = Substitute.For(); var settingsPageViewModel = new AccountPageViewModel( tinkApp, @@ -140,7 +139,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -151,7 +150,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account lastVersion: new Version(3, 0, 173), // Current app version. Must be larger or equal 3.0.173 to whatsNewShownInVersion: null); // Whats new page was never shown. - var viewService = MockRepository.GenerateStub(); + var viewService = Substitute.For(); var settingsPageViewModel = new AccountPageViewModel( tinkApp, (uri) => { }, @@ -183,7 +182,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -194,7 +193,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account lastVersion: new Version(3, 0, 173), // Current app version. Must be larger or equal 3.0.173 to whatsNewShownInVersion: null); // Whats new page was never shown. - var viewService = MockRepository.GenerateStub(); + var viewService = Substitute.For(); var settingsPageViewModel = new AccountPageViewModel( tinkApp, (uri) => { }, @@ -239,7 +238,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -250,7 +249,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.Account lastVersion: new Version(3, 0, 173), // Current app version. Must be larger or equal 3.0.173 to whatsNewShownInVersion: null); // Whats new page was never shown. - var viewService = MockRepository.GenerateStub(); + var viewService = Substitute.For(); var settingsPageViewModel = new AccountPageViewModel( tinkApp, (uri) => { }, diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikeAtStationViewModel.cs b/TestShareeLib/ViewModel/Bikes/Bike/BC/TestBikeAtStationViewModel.cs similarity index 100% rename from TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikeAtStationViewModel.cs rename to TestShareeLib/ViewModel/Bikes/Bike/BC/TestBikeAtStationViewModel.cs diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikePageViewModel.cs b/TestShareeLib/ViewModel/Bikes/Bike/BC/TestMyBikePageViewModel.cs similarity index 84% rename from TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikePageViewModel.cs rename to TestShareeLib/ViewModel/Bikes/Bike/BC/TestMyBikePageViewModel.cs index 5ad8e2e..263505c 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikePageViewModel.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BC/TestMyBikePageViewModel.cs @@ -1,6 +1,6 @@ -using System; +using System; +using NSubstitute; using NUnit.Framework; -using Rhino.Mocks; using TINK.Model.Device; using TINK.ViewModel; using TINK.ViewModel.Bikes; @@ -23,12 +23,12 @@ namespace UITest.Fixtures.ViewModel null, null, null, - NSubstitute.Substitute.For(), + Substitute.For(), null, bike, user, new MyBikeInUseStateInfoProvider(), - MockRepository.GenerateStub(), + Substitute.For(), url => { })); @@ -47,12 +47,12 @@ namespace UITest.Fixtures.ViewModel null, null, null, - NSubstitute.Substitute.For(), + Substitute.For(), null, bike, user, new MyBikeInUseStateInfoProvider(), - MockRepository.GenerateStub(), + Substitute.For(), url => { })); Assert.AreEqual("Code 4asdfA, location Station 3, still 7 min. reserved.", l_oViewModel.StateText); @@ -72,12 +72,12 @@ namespace UITest.Fixtures.ViewModel null, null, null, - NSubstitute.Substitute.For(), + Substitute.For(), null, bike, user, new MyBikeInUseStateInfoProvider(), - MockRepository.GenerateStub(), + Substitute.For(), url => { })); Assert.AreEqual( diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedClosed.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedClosed.cs index fdd875a..4daebd1 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedClosed.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedClosed.cs @@ -1,8 +1,10 @@ using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Newtonsoft.Json; using NSubstitute; +using NSubstitute.ExceptionExtensions; using NUnit.Framework; using TINK.Model; using TINK.Model.Bikes.BikeInfoNS.BluetoothLock; @@ -37,7 +39,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -46,14 +48,140 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For()); // Verify prerequisites. - //Assert.AreEqual("Return bike", handler.ButtonText); + //Assert.AreEqual("End rental", handler.ButtonText); //Assert.IsTrue(handler.IsButtonVisible); Assert.AreEqual("Open lock", handler.LockitButtonText); Assert.IsTrue(handler.IsLockitButtonVisible); } /// - /// Use case: Return bike. + /// Use case: End rental. + /// Final state: Booked, lock state unknown. + /// + /// Replaces test TestReturnOutOfReach which was removed for sharee.bike verion ~3.0.362. + [Test] + public void TestReturnLastGeolocatonNullLockOfOfReach() + { + var bike = Substitute.For(); + var connector = Substitute.For(); + var command = Substitute.For(); + var geolocation = Substitute.For(); + var locks = Substitute.For(); + var pollingManager = Substitute.For(); + var viewService = Substitute.For(); + var bikesViewModel = Substitute.For(); + var activeUser = Substitute.For(); + + var handler = new BookedClosed( + bike, + () => true, // isConnectedDelegate + (isConnexted) => connector, + geolocation, + locks, + () => pollingManager, + Substitute.For(), + viewService, + bikesViewModel, + activeUser); + + bike.Id.Returns("0"); + + bike.LockInfo.Location.Returns((IGeolocation)null); // When locking bike geolocation was not available. + + locks[0].GetDeviceState().Returns(DeviceState.Disconnected); // Simulate bike out of reach. + + locks.DisconnectAsync(0, Arg.Any()).Returns(LockingState.UnknownDisconnected); // Simulate disconnecting. + + bike.State.Value.Returns(InUseStateEnum.Booked); + + var subsequent = handler.HandleRequestOption1().Result; + + // Verify behaviour + Received.InOrder(() => + { + bikesViewModel.Received(1).IsIdle = false; // GUI must be locked + locks[0].GetDeviceState(); + viewService.DisplayAlert( + "Error at ending rental!", + "We could not assign the bike to any station. For this we need your location information while you are standing right next to the bike. Only then your rental can be terminated!\r\n\r\nApproach the bike, turn on Bluetooth and Location services and try again.", + "OK"); + bikesViewModel.ActionText = "Disconnecting lock..."; + locks.DisconnectAsync(0, Arg.Any()); + bikesViewModel.ActionText = string.Empty; + bikesViewModel.Received(1).IsIdle = true; // GUI must be unlocked + }); + + // Verify state after action + Assert.AreEqual("BookedDisconnected", subsequent.ButtonText); + Assert.IsFalse(subsequent.IsButtonVisible); + Assert.AreEqual("Search lock", subsequent.LockitButtonText); + Assert.IsTrue(subsequent.IsLockitButtonVisible); + } + + /// + /// Use case: End rental. + /// Final state: Booked, lock state unknown. + /// + /// Replaces test TestReturnLockInReachNoGeolocation which was removed for sharee.bike older ~ 3.0.362. + [Test] + public void TestReturnStartGetGeolocationException() + { + var bike = Substitute.For(); + var connector = Substitute.For(); + var command = Substitute.For(); + var geolocation = Substitute.For(); + var locks = Substitute.For(); + var pollingManager = Substitute.For(); + var viewService = Substitute.For(); + var bikesViewModel = Substitute.For(); + var activeUser = Substitute.For(); + + var handler = new BookedClosed( + bike, + () => true, // isConnectedDelegate + (isConnexted) => connector, + geolocation, + locks, + () => pollingManager, + Substitute.For(), + viewService, + bikesViewModel, + activeUser); + + bike.Id.Returns("0"); + + bike.LockInfo.Location.Returns((IGeolocation)null); // When locking bike geolocation was not available. + + locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. + + geolocation.GetAsync(Arg.Any(), Arg.Any()).Throws(new Exception("Ups...")); // Simulate error when starting query for geolocation. + + var subsequent = handler.HandleRequestOption1().Result; + + // Verify behaviour + Received.InOrder(() => + { + bikesViewModel.Received(1).IsIdle = false; // GUI must be locked + locks[0].GetDeviceState(); + bikesViewModel.ActionText = "Start query location..."; + geolocation.GetAsync(Arg.Any(), Arg.Any()); + viewService.DisplayAlert( + "Error at ending rental!", + "End rental at an unknown location is not possible.\r\nStart getting geolocation failed.", + "OK"); + bikesViewModel.ActionText = string.Empty; + bikesViewModel.Received(1).IsIdle = true; // GUI must be unlocked + }); + + // Verify state after action + Assert.AreEqual("End rental", subsequent.ButtonText); + Assert.IsTrue(subsequent.IsButtonVisible); + Assert.AreEqual("Open lock", subsequent.LockitButtonText); + Assert.IsTrue(subsequent.IsLockitButtonVisible); + } + + /// + /// Use case: End rental. /// Comment: User deceide to abort returning bike /// Final state: Same as initial state. /// @@ -63,7 +191,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -84,7 +212,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(false)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(false)); var subsequent = handler.HandleRequestOption1().Result; @@ -94,28 +222,28 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Received.InOrder(() => { bikesViewModel.Received(1).IsIdle = false; // GUI must be locked - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No"); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No"); bikesViewModel.Received(1).IsIdle = true; // GUI must be unlocked }); // Verify state after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); - //Assert.IsTrue(subsequent.IsButtonVisible); + Assert.AreEqual("End rental", subsequent.ButtonText); + Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); } /// - /// Use case: Return bike. - /// Final state: Disposable closed + /// Use case: End rental. + /// Final state: Booked, lock state unknown. /// [Test] - public void TestReturnOutOfReach() + public void TestReturnGetGeolocationException() { var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -136,11 +264,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + bike.LockInfo.Location.Returns((IGeolocation)null); // When locking bike geolocation was not available. - locks[0].GetDeviceState().Returns(DeviceState.Disconnected); // Simulate bike out of reach. + locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. - bike.State.Value.Returns(InUseStateEnum.Disposable); // Reqesthandler factory queries state to create appropriate request handler object. + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + + geolocation.GetAsync(Arg.Any(), Arg.Any()) + .Returns(Task.FromException(new Exception("Ups..."))); // Simulate error starting query for geolocation. var subsequent = handler.HandleRequestOption1().Result; @@ -148,27 +279,27 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Received.InOrder(() => { bikesViewModel.Received(1).IsIdle = false; // GUI must be locked - bikesViewModel.ActionText = "One moment please..."; - pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Returning bike..."; - connector.Command.DoReturn(bike, Arg.Is(x => x == null)); - bikesViewModel.ActionText = "Disconnecting lock..."; - locks.DisconnectAsync(Arg.Any(), Arg.Any()); + locks[0].GetDeviceState(); + bikesViewModel.ActionText = "Start query location..."; + geolocation.GetAsync(Arg.Any(), Arg.Any()); + viewService.DisplayAlert( + "Error at ending rental!", + "End rental at an unknown location is not possible.\r\nGetting geolocation failed.", + "OK"); bikesViewModel.ActionText = "Updating..."; - pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; bikesViewModel.Received(1).IsIdle = true; // GUI must be unlocked }); // Verify state after action - Assert.AreEqual("Reserve bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); - Assert.AreEqual("DisposableDisconnected", subsequent.LockitButtonText); - Assert.IsFalse(subsequent.IsLockitButtonVisible); + Assert.AreEqual("Open lock", subsequent.LockitButtonText); + Assert.IsTrue(subsequent.IsLockitButtonVisible); } /// - /// Use case: Return bike. + /// Use case: End rental. /// Final state: Disposable closed /// [Test] @@ -177,7 +308,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -196,15 +327,21 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel, activeUser); + bike.LockInfo.Location.Returns((IGeolocation)null); + bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. + var location = Substitute.For(); + location.Latitude.Returns(7); + location.Longitude.Returns(9); + geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(Task.FromResult( - new Xamarin.Essentials.Location(7, 9) - )); + location + )); ; bike.State.Value.Returns(InUseStateEnum.Disposable); // Reqesthandler factory queries state to create appropriate request handler object. bike.LockInfo.State.Returns(LockingState.Closed); // Requsthandler factory queries lock state to create appropriate request handler object. @@ -219,7 +356,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Is(x => x != null)); bikesViewModel.ActionText = "Disconnecting lock..."; locks.DisconnectAsync(Arg.Any(), Arg.Any()); @@ -237,74 +374,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re } /// - /// Use case: Return bike. - /// Final state: Disposable closed - /// - [Test] - public void TestReturnLockInReachNoGeolocation() - { - var bike = Substitute.For(); - var connector = Substitute.For(); - var command = Substitute.For(); - var geolocation = Substitute.For(); - var locks = Substitute.For(); - var pollingManager = Substitute.For(); - var viewService = Substitute.For(); - var bikesViewModel = Substitute.For(); - var activeUser = Substitute.For(); - - var handler = new BookedClosed( - bike, - () => true, // isConnectedDelegate - (isConnexted) => connector, - geolocation, - locks, - () => pollingManager, - Substitute.For(), - viewService, - bikesViewModel, - activeUser); - - bike.Id.Returns("0"); - - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); - - locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. - - geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(x => throw new Exception()); - - bike.State.Value.Returns(InUseStateEnum.Disposable); // Reqesthandler factory queries state to create appropriate request handler object. - bike.LockInfo.State.Returns(LockingState.Closed); // Requsthandler factory queries lock state to create appropriate request handler object. - - var subsequent = handler.HandleRequestOption1().Result; - - // Verify behaviour - Received.InOrder(() => - { - bikesViewModel.Received(1).IsIdle = false; // GUI must be locked - geolocation.GetAsync(Arg.Any(), Arg.Any()); - bikesViewModel.ActionText = "One moment please..."; - pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; - connector.Command.DoReturn(bike, Arg.Is(x => x == null)); - bikesViewModel.ActionText = "Disconnecting lock..."; - locks.DisconnectAsync(Arg.Any(), Arg.Any()); - bikesViewModel.ActionText = "Updating..."; - pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again - bikesViewModel.ActionText = string.Empty; - bikesViewModel.Received(1).IsIdle = true; // GUI must be unlocked - }); - - // Verify state after action - Assert.AreEqual("Reserve bike", subsequent.ButtonText); - Assert.IsTrue(subsequent.IsButtonVisible); - Assert.AreEqual("DisposableDisconnected", subsequent.LockitButtonText); - Assert.IsFalse(subsequent.IsLockitButtonVisible); - } - - /// - /// Use case: Return bike. + /// Use case: End rental. /// Final state: Same as initial state. /// [Test] @@ -313,7 +383,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -334,7 +404,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. @@ -355,12 +425,12 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.Received(1).IsIdle = false; // GUI must be locked bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Any()); bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( - "Connection error when returning the bike!", - "Internet must be available when returning the bike.\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", + "Connection error when ending rental.", + "Internet must be available when ending rental. Please establish an Internet connection!\r\nIs WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -370,14 +440,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); } /// - /// Use case: Return bike. + /// Use case: End rental. /// Final state: Same as initial state. /// [Test] @@ -386,7 +456,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -407,7 +477,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. @@ -429,10 +499,10 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.Received(1).IsIdle = false; // GUI must be locked bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Any()); bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error returning bike!", "Returning bike outside of station is not possible. Distance to station 42 is 15986 m.", "OK"); + viewService.DisplayAlert("Error at ending rental!", "End rental outside of station is not possible. Distance to station 42 is 15986 m.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -440,14 +510,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); } /// - /// Use case: Return bike. + /// Use case: End rental. /// Final state: Same as initial state. /// [Test] @@ -456,7 +526,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -477,7 +547,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. @@ -499,10 +569,10 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.Received(1).IsIdle = false; // GUI must be locked bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Any()); bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error returning bike!", "Returning bike at an unknown location is not possible.\r\nBike can be returned if\r\n- location information is available when closing lock\r\n- bike is in reach and location information is available when pressing button \"Return bike\"", "OK"); + viewService.DisplayAlert("Error at ending rental!", "End rental at an unknown location is not possible.\r\nRental can be ended if\r\n- location information is available when closing lock\r\n- bike is in reach and location information is available when pressing button \"End rental\"", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -510,14 +580,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); } /// - /// Use case: Return bike. + /// Use case: End rental. /// Final state: Same as initial state. /// [Test] @@ -526,7 +596,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -547,7 +617,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. @@ -567,7 +637,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.Received(1).IsIdle = false; // GUI must be locked bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Any()); bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert("Statusfehler beim Zurückgeben des Rads!", "Outer message.", "Some invalid data received!", "OK"); @@ -578,14 +648,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); } /// - /// Use case: Return bike. + /// Use case: End rental. /// Final state: Same as initial state. /// [Test] @@ -594,7 +664,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -615,7 +685,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "End rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].GetDeviceState().Returns(DeviceState.Connected); // Simulate bike in reach. If bike is out of reach bluetooth state changes to unknown. @@ -634,10 +704,10 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.Received(1).IsIdle = false; // GUI must be locked bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Any()); bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error returning bike!", "Exception message.", "OK"); + viewService.DisplayAlert("Error at ending rental!", "Exception message.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -645,7 +715,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -661,7 +731,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -706,7 +776,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -722,7 +792,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -782,7 +852,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -843,7 +913,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -887,7 +957,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -903,7 +973,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -939,7 +1009,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = "

Lock is opening.
Please wait until it is completely open.

"; locks.Received()[0].OpenAsync(); // Lock must be closed bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Lock can not be opened!", "The lock could not be opened correctly. Please try again.\r\n\r\nAttention! Your rental has already started.\r\n\r\nIf the lock still won't open, make sure the lock is closed and return the bike. Please report it to the support!", "OK"); + viewService.DisplayAlert("Lock can not be opened!", "The lock could not be opened correctly. Try again!\r\n\r\nAttention! Your rental has already started.\r\nIf the lock still won't open, make sure the lock is closed and end rental.\r\nImportant: Send an email to the operator (otherwise your paid rental will continue!) with: Problem description, bike number, drop-off station.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -963,7 +1033,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1023,7 +1093,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1071,7 +1141,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1087,7 +1157,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1135,7 +1205,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Closed" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1151,7 +1221,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1192,7 +1262,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re locks[0].GetBatteryPercentageAsync(); bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, null); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -1200,7 +1270,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1216,7 +1286,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1265,7 +1335,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1281,7 +1351,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1331,7 +1401,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedDisconnected.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedDisconnected.cs index 4d81754..68b55d0 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedDisconnected.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedDisconnected.cs @@ -32,7 +32,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -53,7 +53,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -91,7 +91,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -137,7 +137,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -153,7 +153,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -187,7 +187,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action bikesViewModel.ActionText = "Request server..."; bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error when connecting with lock!", "Internet must be reachable to connect to lock of rented bike.\r\nContext info\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", "OK"); + viewService.DisplayAlert("Error when connecting with lock!", "Internet must be reachable to connect to lock of rented bike. Please establish an Internet connection!\r\nContext info\r\nIs WIFI/mobile network available and mobile data activated?", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -211,7 +211,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -269,7 +269,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -336,7 +336,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -404,7 +404,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedOpen.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedOpen.cs index 217b195..9068eb2 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedOpen.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedOpen.cs @@ -21,7 +21,7 @@ using TINK.View; using TINK.ViewModel; using TINK.ViewModel.Bikes; using TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler; -using Xamarin.Essentials; +using Geolocation = TINK.Services.Geolocation.Geolocation; namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler { @@ -38,7 +38,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -47,7 +47,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For()); // Verify prerequisites. - Assert.AreEqual("Close lock & return bike", handler.ButtonText); + Assert.AreEqual("Close lock & end rental", handler.ButtonText); Assert.IsTrue(handler.IsButtonVisible); Assert.AreEqual("Close lock", handler.LockitButtonText); Assert.IsTrue(handler.IsLockitButtonVisible); @@ -65,7 +65,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -84,7 +84,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel, activeUser); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0 Allround Mono?", "Yes", "No").Returns(Task.FromResult(false)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0 Allround Mono?", "Yes", "No").Returns(Task.FromResult(false)); var subsequent = handler.HandleRequestOption1().Result; @@ -96,7 +96,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -113,7 +113,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -134,12 +134,16 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(Task.FromResult((LockitLockingState?)LockitLockingState.Closed)); // Return lock state indicating success - geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(Task.FromResult(new Location(1, 2))); + var location = Substitute.For(); + location.Latitude.Returns(1); + location.Longitude.Returns(2); + + geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(Task.FromResult(location)); bike.State.Value.Returns(InUseStateEnum.Disposable); // Return call leads to setting of state to disposable. @@ -152,12 +156,12 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); // Geolocation must be retrieved bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; connector.Command.DoReturn(bike, Arg.Is(x => x.Latitude == 1 && x.Longitude == 2), Arg.Any()); // Booking must be performed bikesViewModel.ActionText = "Disconnecting lock..."; locks.DisconnectAsync(Arg.Any(), Arg.Any()); @@ -184,7 +188,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -205,7 +209,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(x => throw new OutOfReachException()); @@ -224,7 +228,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed @@ -251,7 +255,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -272,7 +276,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); connector.Command.StartReturningBike(bike).Returns(x => throw new WebConnectFailureException("Context info", new Exception("hoppla"))); @@ -291,12 +295,12 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( - "Connection error when returning the bike!", - "Internet must be available when returning the bike.\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", + "Connection error when ending rental.", + "Internet must be available when ending rental. Please establish an Internet connection!\r\nIs WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -306,7 +310,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -318,7 +322,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -339,7 +343,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); connector.Command.StartReturningBike(bike).Returns(x => throw new Exception("Context info", new Exception("hoppla"))); @@ -358,11 +362,11 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( - "Error returning bike!", + "Error at ending rental!", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -372,7 +376,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -388,7 +392,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -409,7 +413,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(x => throw new Exception("Blu")); @@ -429,7 +433,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed @@ -460,7 +464,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -481,7 +485,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(x => throw new CouldntCloseMovingException()); @@ -501,7 +505,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed @@ -519,7 +523,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -535,7 +539,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -556,7 +560,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Open); @@ -575,7 +579,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed @@ -590,7 +594,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -606,7 +610,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -627,12 +631,12 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Closed); - geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(Task.FromException(new Exception("noloc"))); + geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(Task.FromException(new Exception("noloc"))); bike.State.Value.Returns(InUseStateEnum.Booked); // Booking state remains unchanged if closing fails. @@ -646,13 +650,13 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.Received(1).IsIdle = false; // GUI must be locked bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; bikesViewModel.ActionText = string.Empty; - viewService.DisplayAdvancedAlert("Error Query Location!", "Closing the lock and ending the rental is not possible.", "noloc", "OK"); + viewService.DisplayAdvancedAlert("Error query location!", "Closing the lock and ending the rental is not possible.", "noloc", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -660,7 +664,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -676,7 +680,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -697,7 +701,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Closed); @@ -718,16 +722,16 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( - "Connection error when returning the bike!", - "Internet must be available when returning the bike.\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", + "Connection error when ending rental.", + "Internet must be available when ending rental. Please establish an Internet connection!\r\nIs WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -737,7 +741,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -753,7 +757,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -774,7 +778,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Closed); @@ -795,14 +799,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error returning bike!", "Exception message.", "OK"); + viewService.DisplayAlert("Error at ending rental!", "Exception message.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -810,7 +814,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -826,7 +830,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -847,7 +851,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Closed); @@ -871,14 +875,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error returning bike!", "Returning bike outside of station is not possible. Distance to station 77 is 15986 m.", "OK"); + viewService.DisplayAlert("Error at ending rental!", "End rental outside of station is not possible. Distance to station 77 is 15986 m.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -886,7 +890,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -902,7 +906,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -923,7 +927,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Closed); @@ -947,14 +951,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error returning bike!", "Returning bike at an unknown location is not possible.\r\nBike can only be returned if bike is in reach and location information is available.", "OK"); + viewService.DisplayAlert("Error at ending rental!", "End rental at an unknown location is not possible.\r\nRental can only be ended if bike is in reach and location information is available.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -962,7 +966,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -978,7 +982,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -999,7 +1003,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bike.Id.Returns("0"); - viewService.DisplayAlert(string.Empty, "Close lock and return bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); + viewService.DisplayAlert(string.Empty, "Close lock and end rental of bike Nr. 0?", "Yes", "No").Returns(Task.FromResult(true)); locks[0].CloseAsync() .Returns(LockitLockingState.Closed); @@ -1021,12 +1025,12 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re geolocation.GetAsync(Arg.Any(), Arg.Any()); bikesViewModel.ActionText = "One moment please..."; pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action - bikesViewModel.ActionText = "Starting bike return..."; + bikesViewModel.ActionText = "Starting end rental..."; connector.Command.StartReturningBike(bike); // Notify about start bikesViewModel.ActionText = "

Lock is closing.
Please wait until it is completely closed.

"; locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Query location..."; - bikesViewModel.ActionText = "Returning bike..."; + bikesViewModel.ActionText = "Ending rental..."; bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert("Statusfehler beim Zurückgeben des Rads!", "Outer message.", "Some invalid data received!", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -1036,7 +1040,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1052,13 +1056,17 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); var bikesViewModel = Substitute.For(); var activeUser = Substitute.For(); + var startOfTest = DateTime.Now; + + geolocation.GetAsync(Arg.Any(), Arg.Any()).Returns(new Geolocation.Builder { Latitude = 47.99, Longitude = 7.78}.Build()); + var handler = new BookedOpen( bike, () => true, // isConnectedDelegate @@ -1078,6 +1086,14 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var subsequent = handler.HandleRequestOption2().Result; + // Veryfy that location is kept because bike might be returned later. + Assert.That( + bike.LockInfo.Location.Latitude, + Is.EqualTo(47.99).Within(0.001)); + Assert.That( + bike.LockInfo.Location.Longitude, + Is.EqualTo(7.78).Within(0.001)); + // Verify behaviour Received.InOrder(() => { @@ -1095,7 +1111,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1111,7 +1127,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1171,7 +1187,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1231,7 +1247,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1269,7 +1285,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, Arg.Any()); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -1277,7 +1293,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1293,7 +1309,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1339,7 +1355,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1355,7 +1371,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1402,7 +1418,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedUnknown.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedUnknown.cs index 8268c00..a9cd63c 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedUnknown.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestBookedUnknown.cs @@ -36,7 +36,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -61,7 +61,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -106,7 +106,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -122,7 +122,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -182,7 +182,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -242,7 +242,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -286,7 +286,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -302,7 +302,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -338,7 +338,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler bikesViewModel.ActionText = "

Lock is opening.
Please wait until it is completely open.

"; locks.Received()[0].OpenAsync(); // Lock must be closed bikesViewModel.ActionText = ""; - viewService.DisplayAlert("Lock can not be opened!", "The lock could not be opened correctly. Please try again.\r\n\r\nAttention! Your rental has already started.\r\n\r\nIf the lock still won't open, make sure the lock is closed and return the bike. Please report it to the support!", "OK"); + viewService.DisplayAlert("Lock can not be opened!", "The lock could not be opened correctly. Try again!\r\n\r\nAttention! Your rental has already started.\r\nIf the lock still won't open, make sure the lock is closed and end rental.\r\nImportant: Send an email to the operator (otherwise your paid rental will continue!) with: Problem description, bike number, drop-off station.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -362,7 +362,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -422,7 +422,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -470,7 +470,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -487,7 +487,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -535,7 +535,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -551,7 +551,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -592,7 +592,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler locks[0].GetBatteryPercentageAsync(); bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, null); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -600,7 +600,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -616,7 +616,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -665,7 +665,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -681,7 +681,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -731,7 +731,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -747,7 +747,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -790,7 +790,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -806,7 +806,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -866,7 +866,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -926,7 +926,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -964,7 +964,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, Arg.Any()); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -972,7 +972,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -988,7 +988,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1034,7 +1034,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1050,7 +1050,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1097,7 +1097,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableDisconnected.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableDisconnected.cs index c8aa531..7bd22e7 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableDisconnected.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableDisconnected.cs @@ -32,7 +32,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -57,7 +57,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -107,7 +107,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -171,7 +171,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -187,7 +187,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -226,7 +226,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = "Reserving bike..."; connector.Command.DoReserve(bike); // Booking must be performed bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Hint", string.Format("A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/ rentals had already been made.", 0, 7), "OK"); + viewService.DisplayAlert("Hint", string.Format("A reservation of bike {0} was rejected because the maximum allowed number of {1} reservations/rentals had already been made.", 0, 7), "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -250,7 +250,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -289,7 +289,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = "Reserving bike..."; connector.Command.DoReserve(bike); // Booking must be performed bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Connection error when reserving the bike!", "Context info.\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", "OK"); + viewService.DisplayAlert("Connection error when reserving the bike!", "Context info.\r\nIs WIFI/mobile network available and mobile data activated?", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -313,7 +313,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -376,7 +376,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -442,7 +442,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -508,7 +508,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -569,7 +569,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableOpen.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableOpen.cs index 030938d..ab9b09c 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableOpen.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestDisposableOpen.cs @@ -33,7 +33,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -58,7 +58,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -118,7 +118,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -181,7 +181,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -244,7 +244,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -289,7 +289,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -305,7 +305,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -349,7 +349,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Connection error when renting the bike!", - string.Format("Attention: Lock is closed!\r\n{0}\r\n{1}", "Context info.", "Is WIFI available/ mobile network available and mobile data activated / ... ?"), + string.Format("Attention: Lock is closed!\r\n{0}\r\n{1}", "Context info.", "Is WIFI/mobile network available and mobile data activated?"), "OK"); bikesViewModel.ActionText = "Verschließe Schloss..."; locks[0].CloseAsync(); @@ -378,7 +378,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedClosed.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedClosed.cs index e709a24..f912c5f 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedClosed.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedClosed.cs @@ -35,7 +35,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -61,7 +61,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -113,7 +113,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -174,7 +174,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -251,7 +251,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -293,7 +293,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Connection error when canceling the reservation!", - "Context info.\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", + "Context info.\r\nIs WIFI/mobile network available and mobile data activated?", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again @@ -319,7 +319,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -387,7 +387,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -435,7 +435,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -486,7 +486,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -503,7 +503,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -545,7 +545,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when renting the bike!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -572,7 +572,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -641,7 +641,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -708,7 +708,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -775,7 +775,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -839,7 +839,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -893,7 +893,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -910,7 +910,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -964,7 +964,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -981,7 +981,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1027,7 +1027,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler locks[0].GetBatteryPercentageAsync(); bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, null); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -1035,7 +1035,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1052,7 +1052,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1106,7 +1106,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -1123,7 +1123,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -1178,7 +1178,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedDisconnected.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedDisconnected.cs index 78cc888..bac2edf 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedDisconnected.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedDisconnected.cs @@ -33,7 +33,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -59,7 +59,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -109,7 +109,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -168,7 +168,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -243,7 +243,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -283,7 +283,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Connection error when canceling the reservation!", - "Context info\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", + "Context info\r\nIs WIFI/mobile network available and mobile data activated?", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again @@ -309,7 +309,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -374,7 +374,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -436,7 +436,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -452,7 +452,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -486,7 +486,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action bikesViewModel.ActionText = "Request server..."; bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Error when connecting to lock!", "Internet must be reachable to connect to lock of reserved bike.\r\nContext info.\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", "OK"); + viewService.DisplayAlert("Error when connecting to lock!", "Internet must be reachable to connect to lock of reserved bike. Please establish an Internet connection!\r\nContext info.\r\nIs WIFI/mobile network available and mobile data activated?", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -510,7 +510,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -568,7 +568,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -635,7 +635,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -704,7 +704,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedOpen.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedOpen.cs index 20f8ed5..46f8fd4 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedOpen.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedOpen.cs @@ -34,7 +34,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -59,7 +59,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -102,7 +102,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re }); // Verify state after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -118,7 +118,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -160,7 +160,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Connection error when renting the bike!", - string.Format("Attention: Lock is closed!\r\n{0}\r\n{1}", "Context info.", "Is WIFI available/ mobile network available and mobile data activated / ... ?"), + string.Format("Attention: Lock is closed!\r\n{0}\r\n{1}", "Context info.", "Is WIFI/mobile network available and mobile data activated?"), "OK"); bikesViewModel.ActionText = "Wiederverschließe Schloss..."; locks[0].CloseAsync(); @@ -187,7 +187,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -253,7 +253,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -317,7 +317,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -365,7 +365,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Lock can not be closed!", - "Lock cannot be closed until bike is near.\r\nPlease try again to close bike or report bike to support!", + "Lock cannot be closed until bike is near.\r\nPlease try again to close bike or report bike to operator!", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -391,7 +391,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -439,7 +439,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Lock can not be closed!", - "Please try to lock again or report bike to support!\r\nException message.", + "Please try to lock again or report bike to operator!\r\nException message.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again @@ -464,7 +464,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -544,7 +544,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -590,7 +590,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Connection error when canceling the reservation!", - "Context info\r\nIs WIFI available/ mobile network available and mobile data activated / ... ?", + "Context info\r\nIs WIFI/mobile network available and mobile data activated?", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again @@ -615,7 +615,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedUnknown.cs b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedUnknown.cs index 1857086..6b42d35 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedUnknown.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/BluetoothLock/RequestHandler/TestReservedUnknown.cs @@ -38,7 +38,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler Substitute.For(), () => true, // isConnectedDelegate (isConnexted) => Substitute.For(), - Substitute.For(), + Substitute.For(), Substitute.For(), () => Substitute.For(), Substitute.For(), @@ -63,7 +63,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -108,7 +108,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -124,7 +124,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -184,7 +184,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -244,7 +244,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -288,7 +288,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - //Assert.AreEqual("Return bike", subsequent.ButtonText); + //Assert.AreEqual("End rental", subsequent.ButtonText); //Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -304,7 +304,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -340,7 +340,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler bikesViewModel.ActionText = "

Lock is opening.
Please wait until it is completely open.

"; locks.Received()[0].OpenAsync(); // Lock must be closed bikesViewModel.ActionText = string.Empty; - viewService.DisplayAlert("Lock can not be opened!", "The lock could not be opened correctly. Please try again.\r\n\r\nAttention! Your rental has already started.\r\n\r\nIf the lock still won't open, make sure the lock is closed and return the bike. Please report it to the support!", "OK"); + viewService.DisplayAlert("Lock can not be opened!", "The lock could not be opened correctly. Try again!\r\n\r\nAttention! Your rental has already started.\r\nIf the lock still won't open, make sure the lock is closed and end rental.\r\nImportant: Send an email to the operator (otherwise your paid rental will continue!) with: Problem description, bike number, drop-off station.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -364,7 +364,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -424,7 +424,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -465,7 +465,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler locks[0].GetBatteryPercentageAsync(); bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, null); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -473,7 +473,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -489,7 +489,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -538,7 +538,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -554,7 +554,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -604,7 +604,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Open" after action - Assert.AreEqual("Close lock & return bike", subsequent.ButtonText); + Assert.AreEqual("Close lock & end rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Close lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -620,7 +620,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -663,7 +663,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -675,7 +675,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -735,7 +735,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -796,7 +796,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -834,7 +834,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler locks.Received()[0].CloseAsync(); // Lock must be closed bikesViewModel.ActionText = "Updating lock state..."; connector.Command.UpdateLockingStateAsync(bike, Arg.Any()); - bikesViewModel.ActionText = "No web error on updating locking status."; + bikesViewModel.ActionText = "Internet must be available for updating lock status. Please establish an Internet connection!"; bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again bikesViewModel.ActionText = string.Empty; @@ -842,7 +842,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -858,7 +858,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -904,7 +904,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); @@ -920,7 +920,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler var bike = Substitute.For(); var connector = Substitute.For(); var command = Substitute.For(); - var geolocation = Substitute.For(); + var geolocation = Substitute.For(); var locks = Substitute.For(); var pollingManager = Substitute.For(); var viewService = Substitute.For(); @@ -967,7 +967,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler }); // Verify state "Booked Closed" after action - Assert.AreEqual("Return bike", subsequent.ButtonText); + Assert.AreEqual("End rental", subsequent.ButtonText); Assert.IsTrue(subsequent.IsButtonVisible); Assert.AreEqual("Open lock", subsequent.LockitButtonText); Assert.IsTrue(subsequent.IsLockitButtonVisible); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedClosed.cs b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedClosed.cs index 2c9a3eb..a5c9cb6 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedClosed.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedClosed.cs @@ -62,7 +62,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when opening the lock!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; diff --git a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedOpen.cs b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedOpen.cs index 6856922..c08d7f9 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedOpen.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestBookedOpen.cs @@ -62,7 +62,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when opening the lock!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; diff --git a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestDisposableClosed.cs b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestDisposableClosed.cs index f522290..69b37d5 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestDisposableClosed.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestDisposableClosed.cs @@ -130,7 +130,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when renting the bike!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -411,7 +411,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAlert( "Hint", - "A reservation of bike Nr. 0 was rejected because the maximum allowed number of 4 reservations/ rentals had already been made.", + "A reservation of bike Nr. 0 was rejected because the maximum allowed number of 4 reservations/rentals had already been made.", "OK"); bikesViewModel.ActionText = "Updating..."; pollingManager.StartUpdateAyncPeridically(); // polling must be restarted again @@ -486,7 +486,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when reserving the bike!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; diff --git a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestFeedbackPending.cs b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestFeedbackPending.cs index 11019cc..20a47f6 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestFeedbackPending.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestFeedbackPending.cs @@ -78,7 +78,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler Is.False); Assert.That( subsequent.LockitButtonText, - Is.EqualTo("Give Feedback")); + Is.EqualTo("Give feedback")); Assert.That( subsequent.IsLockitButtonVisible, Is.True); @@ -135,7 +135,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler Is.False); Assert.That( subsequent.LockitButtonText, - Is.EqualTo("Give Feedback")); + Is.EqualTo("Give feedback")); Assert.That( subsequent.IsLockitButtonVisible, Is.True); @@ -195,7 +195,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler Is.False); Assert.That( subsequent.LockitButtonText, - Is.EqualTo("Give Feedback")); + Is.EqualTo("Give feedback")); Assert.That( subsequent.IsLockitButtonVisible, Is.True); diff --git a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestReservedClosed.cs b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestReservedClosed.cs index d00b3fd..5b917ff 100644 --- a/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestReservedClosed.cs +++ b/TestShareeLib/ViewModel/Bikes/Bike/CopriLock/RequestHandler/TestReservedClosed.cs @@ -197,7 +197,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when canceling the reservation!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; @@ -472,7 +472,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.CopriLock.RequestHandler bikesViewModel.ActionText = string.Empty; viewService.DisplayAdvancedAlert( "Connection error when renting the bike!", - "Is WIFI available/ mobile network available and mobile data activated / ... ?", + "Is WIFI/mobile network available and mobile data activated?", "Context info", "OK"); bikesViewModel.ActionText = "Updating..."; diff --git a/TestShareeLib/ViewModel/BikesAtStation/TestBikesAtStationPageViewModel.cs b/TestShareeLib/ViewModel/BikesAtStation/TestBikesAtStationPageViewModel.cs index 19c1caa..8ce9056 100644 --- a/TestShareeLib/ViewModel/BikesAtStation/TestBikesAtStationPageViewModel.cs +++ b/TestShareeLib/ViewModel/BikesAtStation/TestBikesAtStationPageViewModel.cs @@ -38,7 +38,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_NotLoggedIn() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -122,7 +122,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_NoBikes() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -192,7 +192,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -314,7 +314,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_NoPermissions_OpenSettings() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -444,7 +444,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_NoPermissions() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -571,7 +571,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_GeolocationOff() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -694,7 +694,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_BluetoothOff() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -847,7 +847,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -926,7 +926,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -1003,7 +1003,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -1080,7 +1080,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -1168,7 +1168,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -1260,7 +1260,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), diff --git a/TestShareeLib/ViewModel/Map/TestMapPageFilter.cs b/TestShareeLib/ViewModel/Map/TestMapPageFilter.cs index 41546e1..278b932 100644 --- a/TestShareeLib/ViewModel/Map/TestMapPageFilter.cs +++ b/TestShareeLib/ViewModel/Map/TestMapPageFilter.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using NUnit.Framework; using TINK.Model; using TINK.Model.Connector; @@ -39,5 +39,156 @@ namespace UITest.Fixtures.ObjectTests.Map Assert.IsTrue(l_oFilter.IsToggleVisible); } + + /// + /// Verifies that if Konrad is turned off in settings map page filter does no more contain Konrad option. + /// + [Test] + public void TestGetFilterDictinaryMapPage_NoKonrad_TinkOnKonradOff() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) + new List { "TINK" }); // Filters from settings page. + + Assert.AreEqual(1, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.On, l_oDict["TINK"]); + } + + /// + /// Verifies that if Konrad is turned off in settings map page filter does no more contain Konrad option. + /// + [Test] + public void TestGetFilterDictinaryMapPage_NoKonrad_TinkOffKonradOn() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.Off }, { "Konrad", FilterState.On } }), // Last map page filter (Konrad was still available but off) + new List { "TINK" }); // Filters from settings page. + + Assert.AreEqual(1, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.On, l_oDict["TINK"]); + } + + /// + /// Verifies that if TINK.* is turned off in settings map page filter does no more contain TINK option. + /// + [Test] + public void TestGetFilterDictinaryMapPage_NoTink_TinkOnKonradOff() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) + new List { "Konrad" }); // Filters from settings page. + + Assert.AreEqual(1, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("Konrad")); + Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); + } + + /// + /// Verifies that if Konrad is turned on in settings map page filter is updated with entry Konrad. + /// + [Test] + public void TestGetFilterDictinaryMapPage_TinkOn() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On } }), // Last map page filter (Konrad was still available but off) + new List { "TINK", "Konrad" }); // Filters from settings page. + + Assert.AreEqual(2, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.Off, l_oDict["TINK"]); + Assert.IsTrue(l_oDict.ContainsKey("Konrad")); + Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); + } + + /// + /// Verifies that if Konrad is turned on in settings map page filter is updated with entry Konrad. + /// + [Test] + public void TestGetFilterDictinaryMapPage_TinkOff() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.Off } }), // Last map page filter (Konrad was still available but off) + new List { "TINK", "Konrad" }); // Filters from settings page. + + Assert.AreEqual(2, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.Off, l_oDict["TINK"]); + Assert.IsTrue(l_oDict.ContainsKey("Konrad")); + Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); + } + + /// + /// Verifies that map page filters are not touched if state is consitend. + /// + [Test] + public void TestGetFilterDictinaryMapPage_AllOn_KonradActivated() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.Off }, { "Konrad", FilterState.On } }), // Last map page filter (Konrad was still available but off) + new List { "TINK", "Konrad" }); // Filters from settings page. + + Assert.AreEqual(2, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.Off, l_oDict["TINK"]); + Assert.IsTrue(l_oDict.ContainsKey("Konrad")); + Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); + } + + /// + /// Verifies that map page filters are not touched if state is consitend.. + /// + [Test] + public void TestGetFilterDictinaryMapPage_AllOn_TinkActivated() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) + new List { "TINK", "Konrad" }); // Filters from settings page. + + Assert.AreEqual(2, l_oDict.Count); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.On, l_oDict["TINK"]); + Assert.IsTrue(l_oDict.ContainsKey("Konrad")); + Assert.AreEqual(FilterState.Off, l_oDict["Konrad"]); + } + + /// + /// Verifies that map page filters are not touched if state is consitend. + /// + [Test] + public void TestGetFilterDictinaryMapPage_NullFilter() + { + var l_oDict = GroupFilterMapPageHelper.CreateUpdated( + new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) + null); + + Assert.AreEqual(2, l_oDict.Count, "Do not apply any filter if filter value null is detected."); + Assert.IsTrue(l_oDict.ContainsKey("TINK")); + Assert.AreEqual(FilterState.On, l_oDict["TINK"]); + Assert.IsTrue(l_oDict.ContainsKey("Konrad")); + Assert.AreEqual(FilterState.Off, l_oDict["Konrad"]); + + l_oDict = GroupFilterMapPageHelper.CreateUpdated( + null, + null); + + Assert.IsNull(l_oDict, "Do not apply any filter if filter value null is detected."); + } + + [Test] + public void TestDoToggle() + { + var l_oFilter = new TinkKonradToggleViewModel(new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } })); + + l_oFilter = new TinkKonradToggleViewModel(l_oFilter.FilterDictionary).DoToggle(); + + Assert.AreEqual("Konrad", l_oFilter.CurrentFilter); + + l_oFilter = new TinkKonradToggleViewModel(l_oFilter.FilterDictionary).DoToggle(); + + Assert.AreEqual("TINK", l_oFilter.CurrentFilter); + } + } } diff --git a/TestShareeLib/ViewModel/Map/TestMapPageViewModel.cs b/TestShareeLib/ViewModel/Map/TestMapPageViewModel.cs index 38dde72..aa681b8 100644 --- a/TestShareeLib/ViewModel/Map/TestMapPageViewModel.cs +++ b/TestShareeLib/ViewModel/Map/TestMapPageViewModel.cs @@ -50,7 +50,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -71,7 +71,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, Substitute.For(), - Substitute.For(), + Substitute.For(), (mapspan) => { }, viewService, navigationService); @@ -131,7 +131,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -152,7 +152,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, NSubstitute.Substitute.For(), - NSubstitute.Substitute.For(), + NSubstitute.Substitute.For(), (mapspan) => { }, viewService, navigationService); @@ -209,7 +209,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -228,7 +228,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, Substitute.For(), - Substitute.For(), + Substitute.For(), (mapspan) => { }, viewService, navigationService); @@ -282,7 +282,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -301,7 +301,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, Substitute.For(), - Substitute.For(), + Substitute.For(), (mapspan) => { }, viewService, navigationService); @@ -355,7 +355,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -374,7 +374,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, Substitute.For(), - Substitute.For(), + Substitute.For(), (mapspan) => { }, viewService, navigationService); @@ -444,7 +444,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -463,7 +463,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, Substitute.For(), - Substitute.For(), + Substitute.For(), (mapspan) => { }, viewService, navigationService); @@ -534,7 +534,7 @@ namespace TestShareeLib.UseCases.Startup merchantId: "MyMerchId", bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -554,7 +554,7 @@ namespace TestShareeLib.UseCases.Startup tinkApp, locationPermission, Substitute.For(), - Substitute.For(), + Substitute.For(), (mapspan) => { }, viewService, navigationService); diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs b/TestShareeLib/ViewModel/MyBikes/TestMyBikesPageViewModel.cs similarity index 96% rename from TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs rename to TestShareeLib/ViewModel/MyBikes/TestMyBikesPageViewModel.cs index 734c20b..a5ab644 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs +++ b/TestShareeLib/ViewModel/MyBikes/TestMyBikesPageViewModel.cs @@ -38,7 +38,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -135,7 +135,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_NoPermissions_OpenSettings() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -237,7 +237,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_NoPermissions() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -341,7 +341,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_GeolocationOff() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -439,7 +439,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel [Test] public async Task TestConstruct_Droid_BluetoothOff() { - var geolocation = Substitute.For>(); + var geolocation = Substitute.For>(); var locksService = Substitute.For(); var timeOut = Substitute.For(); var viewService = Substitute.For(); @@ -569,7 +569,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -605,7 +605,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel Assert.IsFalse(myBikes.IsBikesListVisible, "If there are any bikes, list must be visible."); Assert.IsTrue(myBikes.IsNoBikesOccupiedVisible); - Assert.AreEqual("There are currently no bicycles reserved/booked on user a@b.", myBikes.NoBikesOccupiedText); + Assert.AreEqual("There are currently no bikes reserved/rented by user a@b.", myBikes.NoBikesOccupiedText); } [Test] @@ -636,7 +636,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: null, - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), // Permissions specialFolder: new SpecialFolderMock(), @@ -671,8 +671,8 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel Assert.IsTrue(myBikes.IsIdle); Assert.IsTrue(myBikes.IsBikesListVisible, "If there are any bikes, list must be visible."); - Assert.AreEqual("Rented since 28. November 13:06.", myBikes.FirstOrDefault(x => x.Id == "7").StateText); - Assert.AreEqual("Rented since 28. November 11:01.", myBikes.FirstOrDefault(x => x.Id == "8").StateText); + Assert.AreEqual($"Rented since {DateTime.Parse("2017-11-28 13:06:55.147368+01"):dd. MMMM HH:mm}.", myBikes.FirstOrDefault(x => x.Id == "7").StateText); + Assert.AreEqual($"Rented since {DateTime.Parse("2017-11-28 11:01:51.637747+01"):dd. MMMM HH:mm}.", myBikes.FirstOrDefault(x => x.Id == "8").StateText); Assert.IsFalse(myBikes.IsNoBikesOccupiedVisible); Assert.AreEqual(string.Empty, myBikes.NoBikesOccupiedText); @@ -719,7 +719,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), @@ -757,8 +757,8 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel Assert.IsTrue(myBikes.IsIdle); Assert.IsTrue(myBikes.IsBikesListVisible, "If there are any bikes, list must be visible."); - Assert.AreEqual("Rented since 28. November 13:06.", myBikes.FirstOrDefault(x => x.Id == "7").StateText); - Assert.AreEqual("Rented since 28. November 11:01.", myBikes.FirstOrDefault(x => x.Id == "8").StateText); + Assert.AreEqual($"Rented since {DateTime.Parse("2017-11-28 13:06:55.147368+01"):dd. MMMM HH:mm}.", myBikes.FirstOrDefault(x => x.Id == "7").StateText); + Assert.AreEqual($"Rented since {DateTime.Parse("2017-11-28 11:01:51.637747+01"):dd. MMMM HH:mm}.", myBikes.FirstOrDefault(x => x.Id == "8").StateText); Assert.IsFalse(myBikes.IsNoBikesOccupiedVisible); Assert.AreEqual(string.Empty, myBikes.NoBikesOccupiedText); @@ -805,7 +805,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: null, - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: locksService, // Cipher device: new DeviceMock(), // Permissions. specialFolder: new SpecialFolderMock(), @@ -843,8 +843,8 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel Assert.IsTrue(myBikes.IsIdle); Assert.IsTrue(myBikes.IsBikesListVisible, "If there are any bikes, list must be visible."); - Assert.AreEqual("Rented since 28. November 13:06.", myBikes.FirstOrDefault(x => x.Id == "7").StateText); - Assert.AreEqual("Rented since 28. November 11:01.", myBikes.FirstOrDefault(x => x.Id == "8").StateText); + Assert.AreEqual($"Rented since {DateTime.Parse("2017-11-28 13:06:55.147368+01"):dd. MMMM HH:mm}.", myBikes.FirstOrDefault(x => x.Id == "7").StateText); + Assert.AreEqual($"Rented since {DateTime.Parse("2017-11-28 11:01:51.637747+01"):dd. MMMM HH:mm}.", myBikes.FirstOrDefault(x => x.Id == "8").StateText); Assert.IsFalse(myBikes.IsNoBikesOccupiedVisible); Assert.AreEqual(string.Empty, myBikes.NoBikesOccupiedText); diff --git a/TestShareeSharedGuiLib/TestShareeSharedGuiLib.csproj b/TestShareeSharedGuiLib/TestShareeSharedGuiLib.csproj index 5a0c682..4db1c72 100644 --- a/TestShareeSharedGuiLib/TestShareeSharedGuiLib.csproj +++ b/TestShareeSharedGuiLib/TestShareeSharedGuiLib.csproj @@ -11,8 +11,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestCachedQueryLoggedIn.cs b/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestCachedQueryLoggedIn.cs deleted file mode 100644 index 434b1d0..0000000 --- a/TestTINKLib/Fixtures/ObjectTests/Connector/Query/TestCachedQueryLoggedIn.cs +++ /dev/null @@ -1,363 +0,0 @@ -using System; -using System.Threading.Tasks; -using Newtonsoft.Json; -using NSubstitute; -using NUnit.Framework; -using Rhino.Mocks; -using TINK.Model.Connector; -using TINK.Model.Services.CopriApi; -using TINK.Repository; -using TINK.Repository.Response; -using TINK.Services.CopriApi; - -namespace TestTINKLib.Fixtures.ObjectTests.Connector.Query -{ - - [TestFixture] - public class TestCachedQueryLoggedIn - { - private const string BIKESAVAILABLE = @"{ - ""copri_version"" : ""4.1.0.0"", - ""bikes"" : {}, - ""response_state"" : ""OK"", - ""apiserver"" : ""https://app.tink-konstanz.de"", - ""authcookie"" : """", - ""response"" : ""bikes_available"", - ""bikes"" : { - ""2352"" : { - ""description"" : ""Cargo Long"", - ""state"" : ""available"", - ""bike"" : ""1"", - ""gps"" : { ""latitude"": ""47.669888"", ""longitude"": ""9.167749"" }, - ""station"" : ""9"" - } - } - }"; - - private const string BIKESAVAILABLEEMPTY = @"{ - ""copri_version"" : ""4.1.0.0"", - ""bikes"" : {}, - ""response_state"" : ""OK"", - ""apiserver"" : ""https://app.tink-konstanz.de"", - ""authcookie"" : """", - ""response"" : ""bikes_available"", - ""bikes"" : { - } - }"; - - private const string BIKESOCCUPIED = @"{ - ""authcookie"" : ""6103_f782a208d9399291ba8d086b5dcc2509_12345678"", - ""debuglevel"" : ""2"", - ""user_group"" : [ ""TINK"" ], - ""user_id"" : ""javaminister@gmail.com"", - ""response"" : ""user_bikes_occupied"", - ""response_state"" : ""OK"", - ""response_text"" : ""Die Liste der reservierten und gebuchten Fahrräder wurde erfolgreich geladen"", - ""apiserver"" : ""https://tinkwwp.copri-bike.de"", - ""bikes_occupied"" : { - ""89004"" : { - ""start_time"" : ""2018-01-27 17:33:00.989464+01"", - ""station"" : ""9"", - ""unit_price"" : ""2.00"", - ""tariff_description"": { - ""free_hours"" : ""0.5"", - ""name"" : ""TINK Tarif"", - ""max_eur_per_day"" : ""9.00"" - }, - ""timeCode"" : ""2061"", - ""description"" : ""Cargo Long"", - ""bike"" : ""4"", - ""total_price"" : ""20.00"", - ""state"" : ""requested"", - ""real_hours"" : ""66.05"", - ""bike_group"" : [ ""TINK"" ], - ""now_time"" : ""2018-01-30 11:36:45"", - ""request_time"" : ""2018-01-27 17:33:00.989464+01"", - ""computed_hours"" : ""10.0"" - } - } - }"; - - private const string STATIONSALL = @"{ - ""copri_version"" : ""4.1.0.0"", - ""stations"" : { - ""5"" : { - ""station"" : ""5"", - ""bike_soll"" : ""0"", - ""bike_ist"" : ""7"", - ""station_group"" : [ ""TINK"" ], - ""gps"" : { ""latitude"": ""47.66756"", ""longitude"": ""9.16477"" }, - ""state"" : ""available"", - ""description"" : """" - }, - ""13"" : { - ""station"" : ""13"", - ""bike_soll"" : ""4"", - ""bike_ist"" : ""1"", - ""station_group"" : [ ""TINK"" ], - ""gps"" : { ""latitude"": ""47.657756"", ""longitude"": ""9.176084"" }, - ""state"" : ""available"", - ""description"" : """" - }, - ""30"" : { - ""station"" : ""30"", - ""bike_soll"" : ""5"", - ""bike_ist"" : ""0"", - ""station_group"" : [ ""TINK"", ""Konrad"" ], - ""gps"" : { ""latitude"": ""47.657766"", ""longitude"": ""9.176094"" }, - ""state"" : ""available"", - ""description"" : ""Test für Stadtradstation"" - } - }, - ""user_group"" : [ ""Konrad"", ""TINK"" ], - ""response_state"" : ""OK"", - ""authcookie"" : ""6103_f782a208d9399291ba8d086b5dcc2509_12345678"", - ""debuglevel"" : ""2"", - ""response"" : ""stations_all"", - ""user_id"" : ""javaminister@gmail.com"", - ""apiserver"" : ""https://tinkwwp.copri-bike.de"" - }"; - - private const string STATIONSALLEMPTY = @"{ - ""copri_version"" : ""4.1.0.0"", - ""stations"" : { - }, - ""user_group"" : [ ""Konrad"", ""TINK"" ], - ""response_state"" : ""OK"", - ""authcookie"" : ""6103_f782a208d9399291ba8d086b5dcc2509_12345678"", - ""debuglevel"" : ""2"", - ""response"" : ""stations_all"", - ""user_id"" : ""javaminister@gmail.com"", - ""apiserver"" : ""https://tinkwwp.copri-bike.de"" - }"; - - [Test] - public async Task TestGetStations_StationsFromCache() - { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(STATIONSALL), - new GeneralData(), - new System.Exception("Bang when getting stations...")))); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData()))); - - server.Stub(x => x.GetBikesOccupied(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); - - Assert.AreEqual(3, result.Response.StationsAll.Count); - Assert.AreEqual(2, result.Response.Bikes.Count); - Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); - Assert.AreEqual("Bang when getting stations...", result.Exception.Message); - } - - [Test] - public async Task TestGetStations_BikesAvailableFromCache() - { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(STATIONSALLEMPTY), - new GeneralData()))); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData(), - new System.Exception("Bang when getting bikes...")))); - - server.Stub(x => x.GetBikesOccupied(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData()))); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(STATIONSALL), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); - - Assert.AreEqual(3, result.Response.StationsAll.Count); - Assert.AreEqual(2, result.Response.Bikes.Count); - Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); - Assert.AreEqual("Bang when getting bikes...", result.Exception.Message); - } - - [Test] - public async Task TestGetStations_BikesOccupiedFromCache() - { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(STATIONSALLEMPTY), - new GeneralData()))); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESAVAILABLEEMPTY), - new GeneralData()))); - - server.Stub(x => x.GetBikesOccupied(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData(), - new System.Exception("Bang when getting bikes occupied...")))); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData()))); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(STATIONSALL), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); - - Assert.AreEqual(3, result.Response.StationsAll.Count); - Assert.AreEqual(2, result.Response.Bikes.Count); - Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); - Assert.AreEqual("Bang when getting bikes occupied...", result.Exception.Message); - } - - [Test] - public async Task TestGetStations() - { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetStations(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(STATIONSALL), - new GeneralData()))); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData()))); - - server.Stub(x => x.GetBikesOccupied(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData()))); - - server.Stub(x => x.AddToCache(Arg>.Is.Anything)); - server.Stub(x => x.AddToCache(Arg>.Is.Anything)); - server.Stub(x => x.AddToCache(Arg>.Is.Anything)); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAndStationsAsync(); - - Assert.AreEqual(3, result.Response.StationsAll.Count); - Assert.AreEqual(2, result.Response.Bikes.Count); - Assert.AreEqual(typeof(CopriCallsHttps), result.Source); - Assert.IsNull(result.Exception); - } - - [Test] - public async Task TestGetBikes_BikesAvailableFromCache() - { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetBikesAvailable()).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData(), - new System.Exception("Bang, bikes avail...")))); - - server.Stub(x => x.GetBikesOccupied(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); - - Assert.AreEqual(2, result.Response.Count); - Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); - Assert.AreEqual("Bang, bikes avail...", result.Exception.Message); - } - - [Test] - public async Task TestGetBikes_BikesOccupiedFromCache() - { - var server = MockRepository.GenerateMock(); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESAVAILABLEEMPTY), - new GeneralData()))); - - server.Stub(x => x.GetBikesOccupied(Arg.Matches(fromCache => fromCache == false))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData(), - new System.Exception("Bang, error bikes occupied")))); - - server.Stub(x => x.GetBikesAvailable(Arg.Matches(fromCache => fromCache == true))).Return(Task.Run(() => new Result( - typeof(CopriCallsMonkeyStore), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); - - Assert.AreEqual(2, result.Response.Count); - Assert.AreEqual(typeof(CopriCallsMonkeyStore), result.Source); - Assert.AreEqual("Bang, error bikes occupied", result.Exception.Message); - } - - [Test] - public async Task TestGetBikes() - { - var server = Substitute.For(); - - server.GetBikesAvailable().Returns(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESAVAILABLE), - new GeneralData()))); - - server.GetBikesOccupied().Returns(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesAsync(); - - Assert.AreEqual(2, result.Response.Count); - Assert.AreEqual(typeof(CopriCallsHttps), result.Source); - Assert.IsNull(result.Exception); - } - - [Test] - public async Task TestGetBikesOccupied() - { - var server = Substitute.For(); - - server.GetBikesAvailable().Returns(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject("{}"), - new GeneralData()))); - - server.GetBikesOccupied().Returns(Task.Run(() => new Result( - typeof(CopriCallsHttps), - JsonConvert.DeserializeObject(BIKESOCCUPIED), - new GeneralData()))); - - var result = await new CachedQueryLoggedIn(server, "123", "a@b", () => DateTime.Now).GetBikesOccupiedAsync(); - - Assert.AreEqual(1, result.Response.Count); - Assert.AreEqual(typeof(CopriCallsHttps), result.Source); - Assert.IsNull(result.Exception); - } - } -} diff --git a/TestTINKLib/Fixtures/ObjectTests/Services/BluetoothLock/TestLockItBaseService.cs b/TestTINKLib/Fixtures/ObjectTests/Services/BluetoothLock/TestLockItBaseService.cs deleted file mode 100644 index 6ddfc55..0000000 --- a/TestTINKLib/Fixtures/ObjectTests/Services/BluetoothLock/TestLockItBaseService.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using NSubstitute; -using NUnit.Framework; -using Plugin.BLE.Abstractions.Contracts; -using TINK.Services.BluetoothLock.BLE; -using TINK.Services.BluetoothLock.Exception; -using TINK.Services.BluetoothLock.Tdo; -using DeviceState = Plugin.BLE.Abstractions.DeviceState; - -namespace TestTINKLib.Fixtures.ObjectTests.Services.BluetoothLock -{ - [TestFixture] - public class TestLockItBaseService - { - [Test] - public void TestConnect_Connected_InvalidArgs() - { - var device = Rhino.Mocks.MockRepository.GenerateStub(); - var adapter = Rhino.Mocks.MockRepository.GenerateStub(); - var cipher = Rhino.Mocks.MockRepository.GenerateStub(); - - Rhino.Mocks.RhinoMocksExtensions.Stub(device, x => x.State).Return(DeviceState.Disconnected); - - var exception = Assert.Throws( - () => { var lockIt = LockItEventBased.Authenticate(device, null, adapter, cipher).Result; }, - "If connected no auth is requied."); - - Assert.That(exception.InnerExceptions.Count > 0); - Assert.That(exception.InnerExceptions[0], Is.InstanceOf()); - - } - - [Test] - public void TestConnect_Connected() - { - var device = Substitute.For(); - var adapter = Substitute.For(); - var cipher = Substitute.For(); - var auth = Substitute.For(); - var lockControl = Substitute.For(); - - var authTdo = new LockInfoAuthTdo.Builder - { - Id = 12, - K_seed = new byte[] { (byte)'i', (byte)'V', (byte)'F', (byte)'m', (byte)'u', (byte)'T', (byte)'n', (byte)'K', (byte)'q', (byte)'E', (byte)'Y', (byte)'h', (byte)'m', (byte)'T', (byte)'l', (byte)'e' }, - K_u = new byte[16] - }.Build(); - - device.State.Returns(DeviceState.Connected); - device.GetServiceAsync(Arg.Any(), Arg.Any()).Returns(Task.FromResult(lockControl)); - lockControl.GetCharacteristicAsync(Arg.Any()).Returns(Task.FromResult(auth)); - auth.WriteAsync(Arg.Any()).Returns(Task.FromResult(true)); // Write COPRI seed to lock - auth.ReadAsync(Arg.Any()).Returns(Task.FromResult(new byte[8])); // Read lock seed - cipher.Decrypt(Arg.Any(), Arg.Any()).Returns(new byte[3]); - cipher.Encrypt(Arg.Any(), Arg.Any()).Returns(new byte[16]); - auth.WriteAsync(Arg.Any()).Returns(Task.FromResult(true)); // Write COPRI seed to lock - - device.Name.Returns("Origin"); - - Assert.AreEqual( - "Origin", - LockItEventBased.Authenticate(device, authTdo, adapter, cipher).Result.Name, - "If connected no auth is requied."); - } - - [Test] - public void TestAuth() - { - var authTdo = new LockInfoAuthTdo.Builder - { - Id = 12, - K_seed = new byte[] { (byte)'c', (byte)'b', (byte)'z', (byte)'b', (byte)'y', (byte)'I', (byte)'q', (byte)'j', (byte)'v', (byte)'L', (byte)'V', (byte)'I', (byte)'t', (byte)'C', (byte)'B', (byte)'I' }, - K_u = new byte[16] - }.Build(); - - var device = Rhino.Mocks.MockRepository.GenerateStub(); - var adapter = Rhino.Mocks.MockRepository.GenerateStub(); - var cipher = Rhino.Mocks.MockRepository.GenerateStub(); - - Rhino.Mocks.RhinoMocksExtensions.Stub(device, x => x.State).Return(DeviceState.Disconnected); - - // Use factory to create LockIt-object. - var exception = Assert.Throws( - () => { var lockIt = LockItEventBased.Authenticate(device, authTdo, adapter, cipher).Result; }, - "If connected no auth is requied."); - - Assert.That(exception.InnerExceptions.Count > 0); - Assert.That(exception.InnerExceptions[0], Is.InstanceOf()); - } - } -} diff --git a/TestTINKLib/Fixtures/ObjectTests/Services/TestServicesContainerMutable.cs b/TestTINKLib/Fixtures/ObjectTests/Services/TestServicesContainerMutable.cs deleted file mode 100644 index 39af348..0000000 --- a/TestTINKLib/Fixtures/ObjectTests/Services/TestServicesContainerMutable.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework; -using TINK.Services; - -namespace TestTINKLib.Fixtures.ObjectTests.Services -{ - [TestFixture] - public class TestServicesContainerMutable - { - [Test] - public void TestCtor() - { - var container = new ServicesContainerMutableT(new List { new A(), new B() }, typeof(B).FullName); - Assert.That(container.Active.GetType().FullName, Is.EqualTo("TestTINKLib.Fixtures.ObjectTests.Services.TestServicesContainerMutable+B")); - } - - [Test] - public void TestCtorExceptionDupes() - { - Assert.That(() => new ServicesContainerMutableT(new List { new A(), new B(), new A() }, typeof(B).FullName), Throws.InstanceOf()); - } - - [Test] - public void TestCtorExceptionActiveNotFound() - { - Assert.That(() => new ServicesContainerMutableT(new List { new A(), new B() }, "C"), Throws.InstanceOf()); - } - - [Test] - public void TestSetActive() - { - var container = new ServicesContainerMutableT(new List { new A(), new B() }, typeof(B).FullName); - container.SetActive(typeof(A).FullName); - Assert.That(container.Active.GetType().FullName, Is.EqualTo("TestTINKLib.Fixtures.ObjectTests.Services.TestServicesContainerMutable+A")); - } - - - private class A - { } - - private class B - { } - } -} diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageFilter.cs b/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageFilter.cs deleted file mode 100644 index 7364747..0000000 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageFilter.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework; -using TINK.Model; -using TINK.ViewModel.Map; -namespace UITest.Fixtures.ObjectTests.ViewModel.Map -{ - - [TestFixture] - public class TestMapPageViewModel - { - /// - /// Verifies that if Konrad is turned off in settings map page filter does no more contain Konrad option. - /// - [Test] - public void TestGetFilterDictinaryMapPage_NoKonrad_TinkOnKonradOff() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) - new List { "TINK" }); // Filters from settings page. - - Assert.AreEqual(1, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.On, l_oDict["TINK"]); - } - - /// - /// Verifies that if Konrad is turned off in settings map page filter does no more contain Konrad option. - /// - [Test] - public void TestGetFilterDictinaryMapPage_NoKonrad_TinkOffKonradOn() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.Off }, { "Konrad", FilterState.On } }), // Last map page filter (Konrad was still available but off) - new List { "TINK" }); // Filters from settings page. - - Assert.AreEqual(1, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.On, l_oDict["TINK"]); - } - - /// - /// Verifies that if TINK.* is turned off in settings map page filter does no more contain TINK option. - /// - [Test] - public void TestGetFilterDictinaryMapPage_NoTink_TinkOnKonradOff() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) - new List { "Konrad" }); // Filters from settings page. - - Assert.AreEqual(1, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("Konrad")); - Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); - } - - /// - /// Verifies that if Konrad is turned on in settings map page filter is updated with entry Konrad. - /// - [Test] - public void TestGetFilterDictinaryMapPage_TinkOn() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On } }), // Last map page filter (Konrad was still available but off) - new List { "TINK", "Konrad" }); // Filters from settings page. - - Assert.AreEqual(2, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.Off, l_oDict["TINK"]); - Assert.IsTrue(l_oDict.ContainsKey("Konrad")); - Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); - } - - /// - /// Verifies that if Konrad is turned on in settings map page filter is updated with entry Konrad. - /// - [Test] - public void TestGetFilterDictinaryMapPage_TinkOff() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.Off } }), // Last map page filter (Konrad was still available but off) - new List { "TINK", "Konrad" }); // Filters from settings page. - - Assert.AreEqual(2, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.Off, l_oDict["TINK"]); - Assert.IsTrue(l_oDict.ContainsKey("Konrad")); - Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); - } - - /// - /// Verifies that map page filters are not touched if state is consitend. - /// - [Test] - public void TestGetFilterDictinaryMapPage_AllOn_KonradActivated() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.Off }, { "Konrad", FilterState.On } }), // Last map page filter (Konrad was still available but off) - new List { "TINK", "Konrad" }); // Filters from settings page. - - Assert.AreEqual(2, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.Off, l_oDict["TINK"]); - Assert.IsTrue(l_oDict.ContainsKey("Konrad")); - Assert.AreEqual(FilterState.On, l_oDict["Konrad"]); - } - - /// - /// Verifies that map page filters are not touched if state is consitend.. - /// - [Test] - public void TestGetFilterDictinaryMapPage_AllOn_TinkActivated() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) - new List { "TINK", "Konrad" }); // Filters from settings page. - - Assert.AreEqual(2, l_oDict.Count); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.On, l_oDict["TINK"]); - Assert.IsTrue(l_oDict.ContainsKey("Konrad")); - Assert.AreEqual(FilterState.Off, l_oDict["Konrad"]); - } - - /// - /// Verifies that map page filters are not touched if state is consitend. - /// - [Test] - public void TestGetFilterDictinaryMapPage_NullFilter() - { - var l_oDict = GroupFilterMapPageHelper.CreateUpdated( - new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } }), // Last map page filter (Konrad was still available but off) - null); - - Assert.AreEqual(2, l_oDict.Count, "Do not apply any filter if filter value null is detected."); - Assert.IsTrue(l_oDict.ContainsKey("TINK")); - Assert.AreEqual(FilterState.On, l_oDict["TINK"]); - Assert.IsTrue(l_oDict.ContainsKey("Konrad")); - Assert.AreEqual(FilterState.Off, l_oDict["Konrad"]); - - l_oDict = GroupFilterMapPageHelper.CreateUpdated( - null, - null); - - Assert.IsNull(l_oDict, "Do not apply any filter if filter value null is detected."); - } - - [Test] - public void TestDoToggle() - { - var l_oFilter = new TinkKonradToggleViewModel(new GroupFilterMapPage(new Dictionary { { "TINK", FilterState.On }, { "Konrad", FilterState.Off } })); - - l_oFilter = new TinkKonradToggleViewModel(l_oFilter.FilterDictionary).DoToggle(); - - Assert.AreEqual("Konrad", l_oFilter.CurrentFilter); - - l_oFilter = new TinkKonradToggleViewModel(l_oFilter.FilterDictionary).DoToggle(); - - Assert.AreEqual("TINK", l_oFilter.CurrentFilter); - } - } -} diff --git a/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs b/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs index d939ae3..03d9b2c 100644 --- a/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs +++ b/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs @@ -35,7 +35,7 @@ namespace TestTINKLib.Fixtures.UseCases.ConnectedOffline merchantId: MERCH_ID, bluetoothService: Substitute.For(), locationPermissionsService: Substitute.For(), - locationServicesContainer: Substitute.For>(), + locationServicesContainer: Substitute.For>(), locksService: new LocksServiceMock(), // Cipher device: new DeviceMock(), specialFolder: new SpecialFolderMock(), diff --git a/TestTINKLib/Fixtures/UseCases/TestHelper.cs b/TestTINKLib/Fixtures/UseCases/TestHelper.cs deleted file mode 100644 index 982b4b6..0000000 --- a/TestTINKLib/Fixtures/UseCases/TestHelper.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using TINK.Model; -using TINK.Model.Bikes; -using TINK.Model.Station; -using TINK.Model.User; - -namespace TestTINKLib.Fixtures.UseCases -{ - public class TestHelper - { - /// - /// Get all bikes at a given station from copri. - /// - public static async Task GetBikesAtStation( - User user, - TINK.Model.Connector.IConnector connector, - IEnumerable stations, - string selectedStationId) - { - var l_oBikesAtStation = new BikeCollectionMutable(); - - var l_oBikesAvailable = (await connector.Query.GetBikesAsync()).Response; - - l_oBikesAtStation.Update(l_oBikesAvailable.GetAtStation(selectedStationId), stations); - - return l_oBikesAtStation; - } - } -} diff --git a/TestTINKLib/Mocks/Bike/BikeCollectionMock.cs b/TestTINKLib/Mocks/Bike/BikeCollectionMock.cs deleted file mode 100644 index 3d201b0..0000000 --- a/TestTINKLib/Mocks/Bike/BikeCollectionMock.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.ObjectModel; -using TINK.Model.Bikes; - -using BikeInfoMutable = TINK.Model.Bikes.BikeInfoNS.BC.BikeInfoMutable; - -namespace TestTINKLib.Mocks.Bike -{ - public class BikeCollectionMock : Collection, IBikeDictionaryMutable - { - public BikeInfoMutable GetById(string id) - { - return null; - } - - public void RemoveById(string id) - { - throw new NotSupportedException(); - } - - public bool ContainsKey(string id) - { - throw new NotSupportedException(); - } - } -} diff --git a/TestTINKLib/TestTINKLib.csproj b/TestTINKLib/TestTINKLib.csproj index 003169e..4bc56e8 100644 --- a/TestTINKLib/TestTINKLib.csproj +++ b/TestTINKLib/TestTINKLib.csproj @@ -40,36 +40,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -77,7 +53,7 @@ - 13.0.2 + 13.0.3 5.0.0 @@ -86,16 +62,13 @@ 3.13.3 - 4.3.1 + 4.4.2 runtime; build; native; contentfiles; analyzers; buildtransitive all 1.0.2 - - 3.6.1 - 5.0.0 @@ -133,15 +106,6 @@ TINKLib - - - - - - - - - - + \ No newline at end of file