aylien_news_api 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +67 -0
- data/LICENSE +13 -0
- data/README.md +133 -0
- data/Rakefile +8 -0
- data/aylien_news_api.gemspec +33 -0
- data/docs/Author.md +10 -0
- data/docs/Autocomplete.md +9 -0
- data/docs/Autocompletes.md +8 -0
- data/docs/Category.md +13 -0
- data/docs/CategoryLinks.md +9 -0
- data/docs/Coverages.md +12 -0
- data/docs/DefaultApi.md +829 -0
- data/docs/Entities.md +9 -0
- data/docs/Entity.md +12 -0
- data/docs/EntityLinks.md +8 -0
- data/docs/Error.md +13 -0
- data/docs/ErrorLinks.md +8 -0
- data/docs/Errors.md +8 -0
- data/docs/HistogramInterval.md +9 -0
- data/docs/Histograms.md +12 -0
- data/docs/Location.md +10 -0
- data/docs/Media.md +9 -0
- data/docs/RelatedStories.md +11 -0
- data/docs/Scope.md +11 -0
- data/docs/Sentiment.md +9 -0
- data/docs/Sentiments.md +9 -0
- data/docs/ShareCount.md +9 -0
- data/docs/ShareCounts.md +11 -0
- data/docs/Source.md +13 -0
- data/docs/Stories.md +10 -0
- data/docs/Story.md +27 -0
- data/docs/StoryCluster.md +12 -0
- data/docs/StoryLinks.md +10 -0
- data/docs/Summary.md +8 -0
- data/docs/TimeSeries.md +9 -0
- data/docs/TimeSeriesList.md +11 -0
- data/docs/Trend.md +9 -0
- data/docs/Trends.md +9 -0
- data/lib/aylien_news_api.rb +74 -0
- data/lib/aylien_news_api/api/default_api.rb +1171 -0
- data/lib/aylien_news_api/api_client.rb +365 -0
- data/lib/aylien_news_api/api_error.rb +38 -0
- data/lib/aylien_news_api/configuration.rb +191 -0
- data/lib/aylien_news_api/models/author.rb +192 -0
- data/lib/aylien_news_api/models/autocomplete.rb +183 -0
- data/lib/aylien_news_api/models/autocompletes.rb +176 -0
- data/lib/aylien_news_api/models/category.rb +229 -0
- data/lib/aylien_news_api/models/category_links.rb +183 -0
- data/lib/aylien_news_api/models/coverages.rb +212 -0
- data/lib/aylien_news_api/models/entities.rb +187 -0
- data/lib/aylien_news_api/models/entity.rb +214 -0
- data/lib/aylien_news_api/models/entity_links.rb +174 -0
- data/lib/aylien_news_api/models/error.rb +213 -0
- data/lib/aylien_news_api/models/error_links.rb +173 -0
- data/lib/aylien_news_api/models/errors.rb +175 -0
- data/lib/aylien_news_api/models/histogram_interval.rb +183 -0
- data/lib/aylien_news_api/models/histograms.rb +211 -0
- data/lib/aylien_news_api/models/location.rb +192 -0
- data/lib/aylien_news_api/models/media.rb +193 -0
- data/lib/aylien_news_api/models/related_stories.rb +203 -0
- data/lib/aylien_news_api/models/scope.rb +211 -0
- data/lib/aylien_news_api/models/sentiment.rb +193 -0
- data/lib/aylien_news_api/models/sentiments.rb +183 -0
- data/lib/aylien_news_api/models/share_count.rb +183 -0
- data/lib/aylien_news_api/models/share_counts.rb +209 -0
- data/lib/aylien_news_api/models/source.rb +223 -0
- data/lib/aylien_news_api/models/stories.rb +196 -0
- data/lib/aylien_news_api/models/story.rb +353 -0
- data/lib/aylien_news_api/models/story_cluster.rb +214 -0
- data/lib/aylien_news_api/models/story_links.rb +192 -0
- data/lib/aylien_news_api/models/summary.rb +176 -0
- data/lib/aylien_news_api/models/time_series.rb +183 -0
- data/lib/aylien_news_api/models/time_series_list.rb +203 -0
- data/lib/aylien_news_api/models/trend.rb +183 -0
- data/lib/aylien_news_api/models/trends.rb +185 -0
- data/lib/aylien_news_api/version.rb +17 -0
- data/spec/api/default_api_spec.rb +357 -0
- data/spec/models/author_spec.rb +66 -0
- data/spec/models/autocomplete_spec.rb +56 -0
- data/spec/models/autocompletes_spec.rb +46 -0
- data/spec/models/category_links_spec.rb +56 -0
- data/spec/models/category_spec.rb +96 -0
- data/spec/models/coverages_spec.rb +86 -0
- data/spec/models/entities_spec.rb +56 -0
- data/spec/models/entity_links_spec.rb +46 -0
- data/spec/models/entity_spec.rb +86 -0
- data/spec/models/error_links_spec.rb +46 -0
- data/spec/models/error_spec.rb +96 -0
- data/spec/models/errors_spec.rb +46 -0
- data/spec/models/histogram_interval_spec.rb +56 -0
- data/spec/models/histograms_spec.rb +86 -0
- data/spec/models/location_spec.rb +66 -0
- data/spec/models/media_spec.rb +56 -0
- data/spec/models/related_stories_spec.rb +76 -0
- data/spec/models/scope_spec.rb +76 -0
- data/spec/models/sentiment_spec.rb +56 -0
- data/spec/models/sentiments_spec.rb +56 -0
- data/spec/models/share_count_spec.rb +56 -0
- data/spec/models/share_counts_spec.rb +76 -0
- data/spec/models/source_spec.rb +96 -0
- data/spec/models/stories_spec.rb +66 -0
- data/spec/models/story_cluster_spec.rb +86 -0
- data/spec/models/story_links_spec.rb +66 -0
- data/spec/models/story_spec.rb +236 -0
- data/spec/models/summary_spec.rb +46 -0
- data/spec/models/time_series_list_spec.rb +76 -0
- data/spec/models/time_series_spec.rb +56 -0
- data/spec/models/trend_spec.rb +56 -0
- data/spec/models/trends_spec.rb +56 -0
- metadata +391 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Autocompletes
|
|
20
|
+
describe 'Autocompletes' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Autocompletes.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Autocompletes' do
|
|
31
|
+
it 'should create an instact of Autocompletes' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Autocompletes)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "autocompletes"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::CategoryLinks
|
|
20
|
+
describe 'CategoryLinks' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::CategoryLinks.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of CategoryLinks' do
|
|
31
|
+
it 'should create an instact of CategoryLinks' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::CategoryLinks)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "_self"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "parent"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Category
|
|
20
|
+
describe 'Category' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Category.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Category' do
|
|
31
|
+
it 'should create an instact of Category' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Category)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "id"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "taxonomy"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "level"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "score"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe 'test attribute "confident"' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here
|
|
78
|
+
# should be_a()
|
|
79
|
+
# should be_nil
|
|
80
|
+
# should ==
|
|
81
|
+
# should_not ==
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
describe 'test attribute "links"' do
|
|
86
|
+
it 'should work' do
|
|
87
|
+
# assertion here
|
|
88
|
+
# should be_a()
|
|
89
|
+
# should be_nil
|
|
90
|
+
# should ==
|
|
91
|
+
# should_not ==
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Coverages
|
|
20
|
+
describe 'Coverages' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Coverages.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Coverages' do
|
|
31
|
+
it 'should create an instact of Coverages' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Coverages)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "story_title"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "story_body"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "story_published_at"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "story_language"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe 'test attribute "coverages"' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here
|
|
78
|
+
# should be_a()
|
|
79
|
+
# should be_nil
|
|
80
|
+
# should ==
|
|
81
|
+
# should_not ==
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Entities
|
|
20
|
+
describe 'Entities' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Entities.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Entities' do
|
|
31
|
+
it 'should create an instact of Entities' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Entities)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "title"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "body"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::EntityLinks
|
|
20
|
+
describe 'EntityLinks' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::EntityLinks.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of EntityLinks' do
|
|
31
|
+
it 'should create an instact of EntityLinks' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::EntityLinks)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "dbpedia"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Copyright 2016 Aylien, Inc. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'spec_helper'
|
|
16
|
+
require 'json'
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
# Unit tests for AylienNewsApi::Entity
|
|
20
|
+
describe 'Entity' do
|
|
21
|
+
before do
|
|
22
|
+
# run before each test
|
|
23
|
+
@instance = AylienNewsApi::Entity.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after do
|
|
27
|
+
# run after each test
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test an instance of Entity' do
|
|
31
|
+
it 'should create an instact of Entity' do
|
|
32
|
+
@instance.should be_a(AylienNewsApi::Entity)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
describe 'test attribute "text"' do
|
|
36
|
+
it 'should work' do
|
|
37
|
+
# assertion here
|
|
38
|
+
# should be_a()
|
|
39
|
+
# should be_nil
|
|
40
|
+
# should ==
|
|
41
|
+
# should_not ==
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe 'test attribute "score"' do
|
|
46
|
+
it 'should work' do
|
|
47
|
+
# assertion here
|
|
48
|
+
# should be_a()
|
|
49
|
+
# should be_nil
|
|
50
|
+
# should ==
|
|
51
|
+
# should_not ==
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe 'test attribute "types"' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here
|
|
58
|
+
# should be_a()
|
|
59
|
+
# should be_nil
|
|
60
|
+
# should ==
|
|
61
|
+
# should_not ==
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'test attribute "links"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here
|
|
68
|
+
# should be_a()
|
|
69
|
+
# should be_nil
|
|
70
|
+
# should ==
|
|
71
|
+
# should_not ==
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe 'test attribute "indices"' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here
|
|
78
|
+
# should be_a()
|
|
79
|
+
# should be_nil
|
|
80
|
+
# should ==
|
|
81
|
+
# should_not ==
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
|