/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 2 0 ĠThe ĠAndroid ĠOpen ĠSource ĠProject Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ package Ġcom . android . tools . idea . ui builder . visual Ċ Ċ import Ġorg . jetbrains . android . Android TestCase Ċ Ċ class ĠVisualization Tool Settings Test : ĠAndroid TestCase () Ġ{ ĊĊĠ Ġprivate Ġvar Ġdefault Visible : ĠBoolean Ġ= Ġfalse ĊĠ Ġprivate Ġvar Ġdefault Scale : ĠDouble Ġ= Ġ 0 . 0 ĊĠ Ġprivate Ġvar Ġdefault Show Decoration : ĠBoolean Ġ= Ġfalse ĊĠ Ġprivate Ġlateinit Ġvar Ġdefault Configuration Set : ĠConfiguration Set ĊĠ Ġprivate Ġlateinit Ġvar Ġcustom Configuration Attributes : ĠList < Custom Configuration Attribute > ĊĊĠ Ġoverride Ġfun ĠsetUp () Ġ{ ĊĠĠĠ Ġsuper . setUp () ĊĠĠĠ Ġval Ġsettings Ġ= ĠVisualization Tool Settings . getInstance () ĊĠĠĠ Ġdefault Visible Ġ= Ġsettings . global State . isVisible ĊĠĠĠ Ġdefault Scale Ġ= Ġsettings . global State . scale ĊĠĠĠ Ġdefault Show Decoration Ġ= Ġsettings . global State . show Decoration ĊĠĠĠ Ġdefault Configuration Set Ġ= Ġsettings . global State . configuration Set ĊĠĠĠ Ġcustom Configuration Attributes Ġ= Ġsettings . global State . custom Configuration Attributes ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun ĠtearDown () Ġ{ ĊĠĠĠ Ġsuper . te ar Down () ĊĠĠĠ Ġval Ġsettings Ġ= ĠVisualization Tool Settings . getInstance () ĊĠĠĠ Ġsettings . global State . isVisible Ġ= Ġdefault Visible ĊĠĠĠ Ġsettings . global State . scale Ġ= Ġdefault Scale ĊĠĠĠ Ġsettings . global State . show Decoration Ġ= Ġdefault Show Decoration ĊĠĠĠ Ġsettings . global State . configuration Set Ġ= Ġdefault Configuration Set ĊĠĠĠ Ġsettings . global State . custom Configuration Attributes Ġ= Ġcustom Configuration Attributes ĊĠ Ġ} ĊĊĠ Ġfun Ġtest Share Global State () Ġ{ ĊĠĠĠ Ġval Ġsettings 1 Ġ= ĠVisualization Tool Settings . getInstance () ĊĠĠĠ Ġval Ġsettings 2 Ġ= ĠVisualization Tool Settings . getInstance () ĊĊĠĠĠ ĠassertEquals ( settings 1 . global State , Ġsettings 2 . global State ) ĊĠ Ġ} ĊĊĠ Ġfun Ġtest Save Load Settings () Ġ{ ĊĠĠĠ Ġval Ġsettings Ġ= ĠVisualization Tool Settings . getInstance () ĊĊĠĠĠ Ġval Ġvisible Ġ= Ġfalse ĊĠĠĠ Ġval Ġscale Ġ= Ġ 0 . 1 ĊĠĠĠ Ġval Ġshow Decoration Ġ= Ġfalse ĊĠĠĠ Ġval Ġconfiguration Set Ġ= ĠConfiguration Set . LARGE _ FONT ĊĠĠĠ Ġval Ġcustom Configurations Ġ= Ġempty List < Custom Configuration Attribute >() ĊĊĠĠĠ Ġsettings . global State . isVisible Ġ= Ġvisible ĊĠĠĠ Ġsettings . global State . scale Ġ= Ġscale ĊĠĠĠ Ġsettings . global State . show Decoration Ġ= Ġshow Decoration ĊĠĠĠ Ġsettings . global State . configuration Set Ġ= Ġconfiguration Set ĊĠĠĠ Ġsettings . global State . custom Configuration Attributes Ġ= Ġcustom Configurations ĊĊĠĠĠ Ġ// ĠCheck Ġthe Ġvalues Ġare Ġsame Ġafter Ġgetting Ġanother Ġinstance . ĊĠĠĠ Ġval Ġanother Settings Ġ= ĠVisualization Tool Settings . getInstance () ĊĠĠĠ ĠassertEquals ( visible , Ġanother Settings . global State . isVisible ) ĊĠĠĠ ĠassertEquals ( scale , Ġanother Settings . global State . scale ) ĊĠĠĠ ĠassertEquals ( show Decoration , Ġanother Settings . global State . show Decoration ) ĊĠĠĠ ĠassertEquals ( configuration Set , Ġanother Settings . global State . configuration Set ) ĊĠĠĠ ĠassertEquals ( custom Configurations , Ġanother Settings . global State . custom Configuration Attributes ) ĊĠ Ġ} Ċ }