Skip to content

Commit c409b1f

Browse files
authored
Merge pull request SolrNet#2 from SolrNet/develop
SampleApp ready for use
2 parents 457d189 + 2847581 commit c409b1f

File tree

171 files changed

+21683
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+21683
-0
lines changed

.gitignore

Lines changed: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5+
6+
# User-specific files
7+
*.suo
8+
*.user
9+
*.userosscache
10+
*.sln.docstates
11+
12+
# User-specific files (MonoDevelop/Xamarin Studio)
13+
*.userprefs
14+
15+
# Build results
16+
[Dd]ebug/
17+
[Dd]ebugPublic/
18+
[Rr]elease/
19+
[Rr]eleases/
20+
x64/
21+
x86/
22+
bld/
23+
[Bb]in/
24+
[Oo]bj/
25+
[Ll]og/
26+
27+
# Visual Studio 2015 cache/options directory
28+
.vs/
29+
# Uncomment if you have tasks that create the project's static files in wwwroot
30+
#wwwroot/
31+
32+
# MSTest test Results
33+
[Tt]est[Rr]esult*/
34+
[Bb]uild[Ll]og.*
35+
36+
# NUNIT
37+
*.VisualState.xml
38+
TestResult.xml
39+
40+
# Build Results of an ATL Project
41+
[Dd]ebugPS/
42+
[Rr]eleasePS/
43+
dlldata.c
44+
45+
# Benchmark Results
46+
BenchmarkDotNet.Artifacts/
47+
48+
# .NET Core
49+
project.lock.json
50+
project.fragment.lock.json
51+
artifacts/
52+
**/Properties/launchSettings.json
53+
54+
*_i.c
55+
*_p.c
56+
*_i.h
57+
*.ilk
58+
*.meta
59+
*.obj
60+
*.pch
61+
*.pdb
62+
*.pgc
63+
*.pgd
64+
*.rsp
65+
*.sbr
66+
*.tlb
67+
*.tli
68+
*.tlh
69+
*.tmp
70+
*.tmp_proj
71+
*.log
72+
*.vspscc
73+
*.vssscc
74+
.builds
75+
*.pidb
76+
*.svclog
77+
*.scc
78+
79+
# Chutzpah Test files
80+
_Chutzpah*
81+
82+
# Visual C++ cache files
83+
ipch/
84+
*.aps
85+
*.ncb
86+
*.opendb
87+
*.opensdf
88+
*.sdf
89+
*.cachefile
90+
*.VC.db
91+
*.VC.VC.opendb
92+
93+
# Visual Studio profiler
94+
*.psess
95+
*.vsp
96+
*.vspx
97+
*.sap
98+
99+
# TFS 2012 Local Workspace
100+
$tf/
101+
102+
# Guidance Automation Toolkit
103+
*.gpState
104+
105+
# ReSharper is a .NET coding add-in
106+
_ReSharper*/
107+
*.[Rr]e[Ss]harper
108+
*.DotSettings.user
109+
110+
# JustCode is a .NET coding add-in
111+
.JustCode
112+
113+
# TeamCity is a build add-in
114+
_TeamCity*
115+
116+
# DotCover is a Code Coverage Tool
117+
*.dotCover
118+
119+
# AxoCover is a Code Coverage Tool
120+
.axoCover/*
121+
!.axoCover/settings.json
122+
123+
# Visual Studio code coverage results
124+
*.coverage
125+
*.coveragexml
126+
127+
# NCrunch
128+
_NCrunch_*
129+
.*crunch*.local.xml
130+
nCrunchTemp_*
131+
132+
# MightyMoose
133+
*.mm.*
134+
AutoTest.Net/
135+
136+
# Web workbench (sass)
137+
.sass-cache/
138+
139+
# Installshield output folder
140+
[Ee]xpress/
141+
142+
# DocProject is a documentation generator add-in
143+
DocProject/buildhelp/
144+
DocProject/Help/*.HxT
145+
DocProject/Help/*.HxC
146+
DocProject/Help/*.hhc
147+
DocProject/Help/*.hhk
148+
DocProject/Help/*.hhp
149+
DocProject/Help/Html2
150+
DocProject/Help/html
151+
152+
# Click-Once directory
153+
publish/
154+
155+
# Publish Web Output
156+
*.[Pp]ublish.xml
157+
*.azurePubxml
158+
# Note: Comment the next line if you want to checkin your web deploy settings,
159+
# but database connection strings (with potential passwords) will be unencrypted
160+
*.pubxml
161+
*.publishproj
162+
163+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
164+
# checkin your Azure Web App publish settings, but sensitive information contained
165+
# in these scripts will be unencrypted
166+
PublishScripts/
167+
168+
# NuGet Packages
169+
*.nupkg
170+
# The packages folder can be ignored because of Package Restore
171+
**/packages/*
172+
# except build/, which is used as an MSBuild target.
173+
!**/packages/build/
174+
# Uncomment if necessary however generally it will be regenerated when needed
175+
#!**/packages/repositories.config
176+
# NuGet v3's project.json files produces more ignorable files
177+
*.nuget.props
178+
*.nuget.targets
179+
180+
# Microsoft Azure Build Output
181+
csx/
182+
*.build.csdef
183+
184+
# Microsoft Azure Emulator
185+
ecf/
186+
rcf/
187+
188+
# Windows Store app package directories and files
189+
AppPackages/
190+
BundleArtifacts/
191+
Package.StoreAssociation.xml
192+
_pkginfo.txt
193+
*.appx
194+
195+
# Visual Studio cache files
196+
# files ending in .cache can be ignored
197+
*.[Cc]ache
198+
# but keep track of directories ending in .cache
199+
!*.[Cc]ache/
200+
201+
# Others
202+
ClientBin/
203+
~$*
204+
*~
205+
*.dbmdl
206+
*.dbproj.schemaview
207+
*.jfm
208+
*.pfx
209+
*.publishsettings
210+
orleans.codegen.cs
211+
212+
# Since there are multiple workflows, uncomment next line to ignore bower_components
213+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
214+
#bower_components/
215+
216+
# RIA/Silverlight projects
217+
Generated_Code/
218+
219+
# Backup & report files from converting an old project file
220+
# to a newer Visual Studio version. Backup files are not needed,
221+
# because we have git ;-)
222+
_UpgradeReport_Files/
223+
Backup*/
224+
UpgradeLog*.XML
225+
UpgradeLog*.htm
226+
227+
# SQL Server files
228+
*.mdf
229+
*.ldf
230+
*.ndf
231+
232+
# Business Intelligence projects
233+
*.rdl.data
234+
*.bim.layout
235+
*.bim_*.settings
236+
237+
# Microsoft Fakes
238+
FakesAssemblies/
239+
240+
# GhostDoc plugin setting file
241+
*.GhostDoc.xml
242+
243+
# Node.js Tools for Visual Studio
244+
.ntvs_analysis.dat
245+
node_modules/
246+
247+
# Typescript v1 declaration files
248+
typings/
249+
250+
# Visual Studio 6 build log
251+
*.plg
252+
253+
# Visual Studio 6 workspace options file
254+
*.opt
255+
256+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
257+
*.vbw
258+
259+
# Visual Studio LightSwitch build output
260+
**/*.HTMLClient/GeneratedArtifacts
261+
**/*.DesktopClient/GeneratedArtifacts
262+
**/*.DesktopClient/ModelManifest.xml
263+
**/*.Server/GeneratedArtifacts
264+
**/*.Server/ModelManifest.xml
265+
_Pvt_Extensions
266+
267+
# Paket dependency manager
268+
.paket/paket.exe
269+
paket-files/
270+
271+
# FAKE - F# Make
272+
.fake/
273+
274+
# JetBrains Rider
275+
.idea/
276+
*.sln.iml
277+
278+
# CodeRush
279+
.cr/
280+
281+
# Python Tools for Visual Studio (PTVS)
282+
__pycache__/
283+
*.pyc
284+
285+
# Cake - Uncomment if you are using it
286+
# tools/**
287+
# !tools/packages.config
288+
289+
# Tabs Studio
290+
*.tss
291+
292+
# Telerik's JustMock configuration file
293+
*.jmconfig
294+
295+
# BizTalk build output
296+
*.btp.cs
297+
*.btm.cs
298+
*.odx.cs
299+
*.xsd.cs
300+
301+
/SampleSolrApp/SolrNet.chm
302+
/SampleSolrApp/log.txt
303+
/SampleSolrApp/changelog.txt
304+
/SampleSolrApp.Tests/SolrNet.chm
305+
/SampleSolrApp.Tests/changelog.txt
306+
/solr/solr/data

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# SolrNetSampleApps
22
Includes sample applications that use SolrNet
3+
4+
## How to use the samples:
5+
* Before anything, run `runsolr.bat` in order to start the solr server.
6+
* Open the solution and just run the project.
7+
8+
9+
## Prerequisites
10+
* [Java](https://java.com/en/download/) (in order to run solr)
11+
12+
13+

SampleSolrApp.Tests/App.config

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="Castle.DynamicProxy2" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
7+
<bindingRedirect oldVersion="2.0.3.0" newVersion="2.2.0.0" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
11+
<bindingRedirect oldVersion="1.0.3.0" newVersion="1.2.0.0" />
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="System.Web.Abstractions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
16+
</dependentAssembly>
17+
</assemblyBinding>
18+
</runtime>
19+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#region license
2+
// Copyright (c) 2007-2010 Mauricio Scheffer
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
#endregion
16+
17+
using Xunit;
18+
using Moroco;
19+
using SampleSolrApp.Controllers;
20+
using SampleSolrApp.Models;
21+
using SolrNet;
22+
23+
namespace SampleSolrApp.Tests.Controllers {
24+
public class HomeControllerTest {
25+
[Fact]
26+
public void Index_Without_parameters() {
27+
var solr = new MSolrReadOnlyOperations<Product>();
28+
solr.query &= x => x.Return(new SolrQueryResults<Product>());
29+
var c = new HomeController(solr);
30+
var result = c.Index(new SearchParameters());
31+
}
32+
33+
[Fact]
34+
public void Facets() {
35+
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)