Provide custom IsInstanceOf for testing

This commit is contained in:
Tobe O 2018-07-09 10:28:32 -04:00
parent 5cb941676f
commit 3ee209678d
7 changed files with 222 additions and 170 deletions

View file

@ -5,21 +5,21 @@
<entry key="analyzer">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.3/lib" />
</list>
</value>
</entry>
<entry key="angel_http_exception">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+2/lib" />
</list>
</value>
</entry>
<entry key="angel_jael">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_jael-1.0.1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_jael-1.0.2/lib" />
</list>
</value>
</entry>
@ -75,7 +75,7 @@
<entry key="code_buffer">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/code_buffer-1.0.0/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/code_buffer-1.0.1/lib" />
</list>
</value>
</entry>
@ -138,7 +138,7 @@
<entry key="front_end">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.3/lib" />
</list>
</value>
</entry>
@ -201,7 +201,7 @@
<entry key="jael">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/jael-1.0.4/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/jael-1.0.6+1/lib" />
</list>
</value>
</entry>
@ -236,7 +236,7 @@
<entry key="kernel">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.3/lib" />
</list>
</value>
</entry>
@ -292,7 +292,7 @@
<entry key="node_preamble">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.2/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.3/lib" />
</list>
</value>
</entry>
@ -390,7 +390,7 @@
<entry key="source_maps">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.5/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.6/lib" />
</list>
</value>
</entry>
@ -495,9 +495,9 @@
</option>
</properties>
<CLASSES>
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_jael-1.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_jael-1.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_model-1.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-2.0.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.4.3/lib" />
@ -505,7 +505,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/body_parser-1.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/code_buffer-1.0.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/code_buffer-1.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.10/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/combinator-1.0.0+3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/container-0.1.2/lib" />
@ -514,7 +514,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/dart2_constant-1.0.1+dart2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/file-2.3.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+16/lib" />
@ -523,12 +523,12 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_server-0.9.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/intl-0.15.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.2+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/jael-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/jael-1.0.6+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/jael_preprocessor-1.0.0+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_god-2.0.0-beta+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/merge_map-1.0.0/lib" />
@ -536,7 +536,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mock_request-1.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.0/lib" />
@ -550,7 +550,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.7+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.7+1/lib" />

View file

@ -2,13 +2,13 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/src/core/map_service.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/map_service.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/src/core/response_context.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/response_context.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/common.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/common.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/controller_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/controller_test.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/hooked_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/hooked_test.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/routing_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/routing_test.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/services_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/services_test.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/typed_service_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/typed_service_test.dart" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
@ -34,20 +34,23 @@
<file leaf-file-name="parameter_meta_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/parameter_meta_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="32">
<caret line="2" column="54" selection-start-line="2" selection-start-column="54" selection-end-line="2" selection-end-column="54" />
<state relative-caret-position="48">
<caret line="7" column="42" selection-start-line="7" selection-start-column="42" selection-end-line="7" selection-end-column="42" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="response_context.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/src/core/response_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="437">
<caret line="50" column="75" selection-start-line="50" selection-start-column="75" selection-end-line="50" selection-end-column="75" />
<folding>
<element signature="e#48#68#0" expanded="true" />
</folding>
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="112">
<caret line="7" column="9" selection-start-line="7" selection-start-column="9" selection-end-line="7" selection-end-column="9" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
@ -61,38 +64,53 @@
</provider>
</entry>
</file>
<file leaf-file-name="request_context.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2320">
<caret line="154" column="25" selection-start-line="154" selection-start-column="25" selection-end-line="154" selection-end-column="25" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="angel_http.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="206">
<caret line="319" column="20" lean-forward="true" selection-start-line="319" selection-start-column="20" selection-end-line="319" selection-end-column="20" />
<state relative-caret-position="400">
<caret line="319" column="20" selection-start-line="319" selection-start-column="20" selection-end-line="319" selection-end-column="20" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="map_service.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/core/map_service.dart">
<file leaf-file-name="common.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/common.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="133" column="36" selection-start-line="133" selection-start-column="36" selection-end-line="133" selection-end-column="36" />
<state relative-caret-position="205">
<caret line="39" column="11" lean-forward="true" selection-start-line="39" selection-start-column="11" selection-end-line="39" selection-end-column="11" />
<folding>
<element signature="e#38#92#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<file leaf-file-name="routing_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/routing_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="11" column="25" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
<state relative-caret-position="64">
<caret line="4" column="19" selection-start-line="4" selection-start-column="19" selection-end-line="4" selection-end-column="19" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="typed_service_test.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/test/typed_service_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="160">
<caret line="10" column="5" lean-forward="true" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
<folding>
<element signature="e#0#54#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="hooked_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/hooked_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="99" column="74" lean-forward="true" selection-start-line="99" selection-start-column="74" selection-end-line="99" selection-end-column="74" />
</state>
</provider>
</entry>
@ -109,10 +127,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>beforeIndex</find>
<find>read(</find>
<find>new Trac</find>
<find>frame</find>
<find>logger.</find>
<find>Stopwa</find>
<find>handleAnge</find>
@ -139,6 +153,10 @@
<find>\.cast(&lt;[^&gt;]+&gt;)\(\)</find>
<find>.cast</find>
<find>serviceP</find>
<find>_inject</find>
<find>Typ</find>
<find>TypeMatcher</find>
<find>cast(</find>
</findStrings>
<replaceStrings>
<replace>if (_isClosed &amp;&amp; !_useStream)</replace>
@ -169,8 +187,8 @@
<replace>'text/html'</replace>
<replace>'application/json'</replace>
<replace>as $1</replace>
<replace>as $1</replace>
<replace>as Map$1</replace>
<replace>IsInstanceOf</replace>
</replaceStrings>
<dirStrings>
<dir>C:\Users\thosa\Source\Angel\framework\lib</dir>
@ -194,7 +212,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/test/encoders_buffer_test.dart" />
<option value="$PROJECT_DIR$/test/precontained_test.dart" />
<option value="$PROJECT_DIR$/test/repeat_request_test.dart" />
<option value="$PROJECT_DIR$/example/json.dart" />
@ -225,26 +242,27 @@
<option value="$PROJECT_DIR$/test/streaming_test.dart" />
<option value="$PROJECT_DIR$/lib/hooks.dart" />
<option value="$PROJECT_DIR$/lib/src/core/anonymous_service.dart" />
<option value="$PROJECT_DIR$/lib/src/core/request_context.dart" />
<option value="$PROJECT_DIR$/lib/src/core/routable.dart" />
<option value="$PROJECT_DIR$/test/di_test.dart" />
<option value="$PROJECT_DIR$/lib/src/core/hooked_service.dart" />
<option value="$PROJECT_DIR$/test/controller_test.dart" />
<option value="$PROJECT_DIR$/test/hooked_test.dart" />
<option value="$PROJECT_DIR$/test/accepts_test.dart" />
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
<option value="$PROJECT_DIR$/test/exception_test.dart" />
<option value="$PROJECT_DIR$/test/parameter_meta_test.dart" />
<option value="$PROJECT_DIR$/test/serialize_test.dart" />
<option value="$PROJECT_DIR$/test/server_test.dart" />
<option value="$PROJECT_DIR$/test/routing_test.dart" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0/lib/angel_http_exception.dart" />
<option value="$PROJECT_DIR$/test/typed_service_test.dart" />
<option value="$PROJECT_DIR$/lib/src/core/injection.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/lib/src/core/map_service.dart" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/lib/src/core/response_context.dart" />
<option value="$PROJECT_DIR$/lib/src/core/request_context.dart" />
<option value="$PROJECT_DIR$/test/hooked_test.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/test/common.dart" />
<option value="$PROJECT_DIR$/test/routing_test.dart" />
<option value="$PROJECT_DIR$/test/typed_service_test.dart" />
</list>
</option>
</component>
@ -258,9 +276,9 @@
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="34" />
<option name="x" value="24" />
<option name="y" value="31" />
<option name="width" value="1282" />
<option name="width" value="1403" />
<option name="height" value="784" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
@ -271,9 +289,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane" />
<pane id="AndroidView" />
<pane id="PackagesPane" />
<pane id="Scope">
<subPane subId="Project Files">
<expand>
@ -311,10 +326,18 @@
<item name="framework" type="cbb8eebc:String" user="framework" />
<item name="test" type="cbb8eebc:String" user="test" />
</path>
<path>
<item name="Root" type="cbb8eebc:String" user="Root" />
<item name="framework" type="cbb8eebc:String" user="framework" />
<item name="tool" type="cbb8eebc:String" user="tool" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="ProjectPane" />
<pane id="AndroidView" />
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
@ -356,7 +379,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Dart Test.tests in extension_test.dart">
<component name="RunManager" selected="Dart Test.All Tests">
<configuration name="Can serialize function result as JSON in routing_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
@ -639,14 +662,9 @@
<workItem from="1529722829709" duration="1759000" />
<workItem from="1529724977574" duration="1752000" />
<workItem from="1530115464302" duration="135000" />
<workItem from="1530124258733" duration="424000" />
</task>
<task id="LOCAL-00042" summary="+9">
<created>1511892890049</created>
<option name="number" value="00042" />
<option name="presentableId" value="LOCAL-00042" />
<option name="project" value="LOCAL" />
<updated>1511892890049</updated>
<workItem from="1530124258733" duration="601000" />
<workItem from="1530230623749" duration="89000" />
<workItem from="1531145856019" duration="547000" />
</task>
<task id="LOCAL-00043" summary="1.0.11">
<created>1511893540118</created>
@ -984,13 +1002,17 @@
<option name="project" value="LOCAL" />
<updated>1529726381237</updated>
</task>
<option name="localTasksCounter" value="91" />
<task id="LOCAL-00091" summary="+7">
<created>1530124843110</created>
<option name="number" value="00091" />
<option name="presentableId" value="LOCAL-00091" />
<option name="project" value="LOCAL" />
<updated>1530124843111</updated>
</task>
<option name="localTasksCounter" value="92" />
<servers />
</component>
<component name="TestHistory">
<history-entry file="All_Tests - 2018.06.08 at 02h 54m 57s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="can_delete_data_in_services_test_dart - 2018.06.08 at 02h 55m 21s.xml">
<configuration name="can delete data in services_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
@ -1018,9 +1040,12 @@
<history-entry file="tests_in_extension_test_dart - 2018.06.22 at 23h 57m 51s.xml">
<configuration name="tests in extension_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="All_Tests - 2018.06.28 at 20h 05m 10s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="154162000" />
<option name="totallyTimeSpent" value="154975000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -1032,7 +1057,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="34" y="31" width="1282" height="784" extended-state="0" />
<frame x="24" y="31" width="1403" height="784" extended-state="0" />
<editor active="true" />
<layout>
<window_info anchor="right" id="Palette" order="3" />
@ -1051,13 +1076,14 @@
<window_info id="UI Designer" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39857143" />
<window_info anchor="bottom" id="TODO" order="6" weight="0.32714286" />
<window_info anchor="bottom" id="Messages" order="7" weight="0.33478895" />
<window_info anchor="right" id="Palette&#9;" order="3" />
<window_info id="Image Layers" order="2" />
<window_info anchor="right" id="Capture Analysis" order="3" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.4964476" weight="0.3987879" />
<window_info anchor="bottom" id="Version Control" order="7" weight="0.32905984" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.4964476" weight="0.3973799" />
<window_info anchor="bottom" id="Terminal" order="7" weight="0.45560408" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2814516" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2534901" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32905984" />
<window_info anchor="right" id="SciView" order="4" />
<window_info anchor="right" id="Theme Preview" order="3" />
@ -1065,14 +1091,13 @@
<window_info anchor="right" id="Flutter Inspector" order="4" />
<window_info anchor="bottom" id="DB Execution Console" order="8" />
<window_info anchor="right" id="Coverage" order="3" side_tool="true" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info id="DB Browser" order="2" weight="0.32998413" />
<window_info anchor="bottom" id="Messages" order="7" weight="0.33478895" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Data View" order="4" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="right" id="Data View" order="4" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -1083,7 +1108,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<MESSAGE value="Removed `HttpHeaders` in `ResponseContext`" />
<MESSAGE value="Deprecated AngelMetrics" />
<MESSAGE value="Export HTTP Req+Res context" />
<MESSAGE value="HTTP ResponseContext works" />
@ -1108,7 +1132,8 @@
<MESSAGE value="Fix hooking bug" />
<MESSAGE value="+5" />
<MESSAGE value="+6" />
<option name="LAST_COMMIT_MESSAGE" value="+6" />
<MESSAGE value="+7" />
<option name="LAST_COMMIT_MESSAGE" value="+7" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -1116,20 +1141,6 @@
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file:///usr/local/Cellar/dart/2.0.0-dev.59.0/libexec/lib/async/future.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="631">
<caret line="666" column="12" selection-start-line="666" selection-start-column="12" selection-end-line="666" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="48">
<caret line="3" column="10" selection-start-line="3" selection-start-column="10" selection-end-line="3" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="112">
@ -1320,13 +1331,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/hooked_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="127" column="57" selection-start-line="127" selection-start-column="57" selection-end-line="127" selection-end-column="57" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/accepts_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state>
@ -1362,20 +1366,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/typed_service_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="109">
<caret line="26" column="39" selection-start-line="26" selection-start-column="39" selection-end-line="26" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/routing_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="120" column="39" selection-start-line="120" selection-start-column="39" selection-end-line="120" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/server_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="146">
@ -1390,10 +1380,34 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<entry file="file://$PROJECT_DIR$/lib/src/http/http_request_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="11" column="25" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
<state relative-caret-position="58">
<caret line="121" lean-forward="true" selection-start-line="121" selection-end-line="121" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/response_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="229">
<caret line="37" column="37" lean-forward="true" selection-start-line="37" selection-start-column="37" selection-end-line="37" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/parameter_meta_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="48">
<caret line="7" column="42" selection-start-line="7" selection-start-column="42" selection-end-line="7" selection-end-column="42" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366">
<caret line="38" lean-forward="true" selection-start-line="38" selection-end-line="38" />
</state>
</provider>
</entry>
@ -1404,57 +1418,74 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2320">
<caret line="154" column="25" selection-start-line="154" selection-start-column="25" selection-end-line="154" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="206">
<caret line="319" column="20" lean-forward="true" selection-start-line="319" selection-start-column="20" selection-end-line="319" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/map_service.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="133" column="36" selection-start-line="133" selection-start-column="36" selection-end-line="133" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/http_request_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="58">
<caret line="121" lean-forward="true" selection-start-line="121" selection-end-line="121" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="48">
<caret line="3" column="43" selection-start-line="3" selection-start-column="43" selection-end-line="3" selection-end-column="43" />
<first_editor relative-caret-position="112">
<caret line="7" column="9" selection-start-line="7" selection-start-column="9" selection-end-line="7" selection-end-column="9" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/parameter_meta_test.dart">
<entry file="file://$PROJECT_DIR$/test/hooked_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="32">
<caret line="2" column="54" selection-start-line="2" selection-start-column="54" selection-end-line="2" selection-end-column="54" />
<state relative-caret-position="120">
<caret line="99" column="74" lean-forward="true" selection-start-line="99" selection-start-column="74" selection-end-line="99" selection-end-column="74" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/response_context.dart">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="437">
<caret line="50" column="75" selection-start-line="50" selection-start-column="75" selection-end-line="50" selection-end-column="75" />
<state relative-caret-position="271">
<caret line="32" column="9" selection-start-line="32" selection-start-column="9" selection-end-line="32" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/map_service.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="192">
<caret line="120" column="46" lean-forward="true" selection-start-line="120" selection-start-column="46" selection-end-line="120" selection-end-column="46" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="400">
<caret line="319" column="20" selection-start-line="319" selection-start-column="20" selection-end-line="319" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3/lib/src/core_matchers.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="133">
<caret line="116" column="8" selection-start-line="116" selection-start-column="8" selection-end-line="116" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/common.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="205">
<caret line="39" column="11" lean-forward="true" selection-start-line="39" selection-start-column="11" selection-end-line="39" selection-end-column="11" />
<folding>
<element signature="e#48#68#0" expanded="true" />
<element signature="e#38#92#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/routing_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="64">
<caret line="4" column="19" selection-start-line="4" selection-start-column="19" selection-end-line="4" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/typed_service_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="160">
<caret line="10" column="5" lean-forward="true" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
<folding>
<element signature="e#0#54#0" expanded="true" />
</folding>
</state>
</provider>

View file

@ -1,6 +1,7 @@
library angel_framework.test.common;
import 'package:angel_framework/angel_framework.dart';
import 'package:matcher/matcher.dart';
class Todo extends Model {
String text;
@ -32,3 +33,21 @@ class IncrementService extends Service {
@Hooks(after: const [incrementTodoTimes])
index([params]) async => [];
}
class IsInstanceOf<T> implements Matcher {
const IsInstanceOf();
@override
Description describeMismatch(item, Description mismatchDescription,
Map matchState, bool verbose) {
return mismatchDescription.add('$item is not an instance of $T');
}
@override
Description describe(Description description) {
return description.add('is an instance of $T');
}
@override
bool matches(item, Map matchState) => item is T;
}

View file

@ -100,7 +100,7 @@ main() {
test('optional name', () async {
var app = new Angel();
await app.configure(new NamedController().configureServer);
expect(app.controllers['foo'], const TypeMatcher<NamedController>());
expect(app.controllers['foo'], const IsInstanceOf<NamedController>());
});
test("middleware", () async {

View file

@ -98,7 +98,7 @@ main() {
test('metadata', () async {
final service = new HookedService(new IncrementService())..addHooks();
expect(service.inner, isNot(const TypeMatcher<MapService>()));
expect(service.inner, isNot(const IsInstanceOf<MapService>()));
IncrementService.TIMES = 0;
await service.index();
expect(IncrementService.TIMES, equals(2));
@ -129,7 +129,7 @@ main() {
print('Params to $type ${e.eventName}: ${e.params}');
expect(e.params, isMap);
expect(e.params.keys, contains('provider'));
expect(e.params['provider'], const TypeMatcher<Providers>());
expect(e.params['provider'], const IsInstanceOf<Providers>());
}
svc

View file

@ -2,6 +2,7 @@ import 'package:angel_framework/angel_framework.dart';
import 'package:dart2_constant/convert.dart';
import 'package:http/http.dart' as http;
import 'package:test/test.dart';
import 'common.dart';
@Middleware(const ['interceptor'])
testMiddlewareMetadata(RequestContext req, ResponseContext res) async {
@ -117,7 +118,7 @@ main() {
var response = await client.get('$url/name/HELLO/last/WORLD');
print('Response: ${response.body}');
var json_ = json.decode(response.body);
expect(json_, const TypeMatcher<Map>());
expect(json_, const IsInstanceOf<Map>());
expect(json_['first'], equals('HELLO'));
expect(json_['last'], equals('WORLD'));
});

View file

@ -1,6 +1,7 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/common.dart';
import 'package:test/test.dart';
import 'common.dart';
main() {
var svc = new TypedService<Todo>(new MapService());
@ -39,7 +40,7 @@ main() {
'createdAt': now.toIso8601String(),
'updatedAt': now.toIso8601String()
});
expect(m, const TypeMatcher<Todo>());
expect(m, const IsInstanceOf<Todo>());
var t = m as Todo;
expect(t.createdAt.millisecondsSinceEpoch, now.millisecondsSinceEpoch);
});
@ -50,7 +51,7 @@ main() {
'created_at': now.toIso8601String(),
'updated_at': now.toIso8601String()
});
expect(m, const TypeMatcher<Todo>());
expect(m, const IsInstanceOf<Todo>());
var t = m as Todo;
expect(t.createdAt.millisecondsSinceEpoch, now.millisecondsSinceEpoch);
});