100+ results for 'using xunit; repo:ninject'
Not the results you expected?
RavenDB-7275.cs (https://github.com/fitzchak/ravendb.git) C# · 157 lines
RavenDB_644.cs (https://github.com/jalchr/ravendb.git) C# · 227 lines
4 // </copyright>
5 // -----------------------------------------------------------------------
6 using Raven.Abstractions.Exceptions;
8 namespace Raven.Tests.Issues
9 {
10 using System;
11 using System.ComponentModel.Composition.Hosting;
12 using System.Linq;
13 using Raven.Abstractions.Indexing;
14 using Raven.Client.Indexes;
15 using Xunit;
17 /// <remarks>
ProtectedKeywordRecommenderTests.cs (https://gitlab.com/sharadag/TestProject2) C# · 370 lines
1 // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 using Microsoft.CodeAnalysis;
4 using Microsoft.CodeAnalysis.Text;
5 using Roslyn.Test.Utilities;
6 using Roslyn.Test.Utilities.Parallel;
7 using Xunit;
9 namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Recommendations
45 [Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
46 public void NotInUsingAlias()
47 {
48 VerifyAbsence(
MutablePipeline.cs (https://github.com/Bunk/cassette.git) C# · 210 lines
SyntaxComparerTests.cs (https://gitlab.com/sharadag/TestProject2) C# · 176 lines
1 // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 using System;
4 using System.Collections.Immutable;
5 using Microsoft.CodeAnalysis.Differencing;
6 using Roslyn.Test.Utilities;
7 using Xunit;
9 namespace Microsoft.CodeAnalysis.CSharp.EditAndContinue.UnitTests
FileSystemWatcher.MoveFile.cs (https://gitlab.com/0072016/0072016-corefx-) C# · 238 lines
5 using System;
6 using System.IO;
7 using System.Threading;
8 using Xunit;
10 public class MoveFileTests
121 private static void MoveAndCheck_SameDirectory(WatcherChangeTypes eventType, bool moveRaisesEvent)
122 {
123 using (var dir = Utility.CreateTestDirectory(Guid.NewGuid().ToString()))
124 using (var watcher = new FileSystemWatcher())
130 // create a file
131 using (var testFile = new TemporaryTestFile(Path.Combine(dir.Path, "file")))
132 {
133 watcher.EnableRaisingEvents = true;
ThreadPoolBoundHandle_AllocateNativeOverlappedTests.cs (https://gitlab.com/0072016/0072016-corefx-) C# · 272 lines
5 using System;
6 using System.Runtime.InteropServices;
7 using System.Threading;
8 using Xunit;
10 public partial class ThreadPoolBoundHandleTests
13 public unsafe void AllocateNativeOverlapped_NullAsCallback_ThrowsArgumentNullException()
14 {
15 using(ThreadPoolBoundHandle handle = CreateThreadPoolBoundHandle())
16 {
17 Assert.Throws<ArgumentNullException>("callback", () =>
85 public unsafe void AllocateNativeOverlapped_BlittableTypeAsPinData_DoesNotThrow()
86 {
87 using(ThreadPoolBoundHandle handle = CreateThreadPoolBoundHandle())
88 {
89 NativeOverlapped* result = handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new BlittableType() { i = 42 });
BinaryExclusiveOrTests.cs (https://gitlab.com/0072016/0072016-corefx-) C# · 271 lines
DataLakeStoreTests.cs (https://github.com/Azure/azure-powershell.git) C# · 151 lines
13 // ----------------------------------------------------------------------------------
15 using Microsoft.Azure.Commands.HDInsight;
16 using Microsoft.Azure.Commands.HDInsight.ManagementCommands;
17 using Microsoft.Azure.Commands.HDInsight.Models;
18 using Microsoft.Azure.Commands.HDInsight.Test;
19 using Microsoft.Azure.ServiceManagement.Common.Models;
20 using Microsoft.WindowsAzure.Commands.Common;
21 using Microsoft.WindowsAzure.Commands.ScenarioTest;
22 using Moq;
24 using System.Management.Automation;
25 using Xunit;
27 namespace Commands.HDInsight.Test.UnitTests
ActiveDebugFrameworkServicesTests.cs (https://github.com/dotnet/project-system.git) C# · 107 lines
1 // Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information.
3 using System.Collections.Immutable;
4 using System.Threading.Tasks;
5 using Microsoft.VisualStudio.ProjectSystem.Debug;
6 using Moq;
7 using Xunit;
9 namespace Microsoft.VisualStudio.ProjectSystem.Input.Commands
WebSocketFrameAggregatorTest.cs (https://github.com/Azure/DotNetty.git) C# · 140 lines
4 namespace DotNetty.Codecs.Http.Tests.WebSockets
5 {
6 using System;
7 using System.Text;
8 using DotNetty.Buffers;
9 using DotNetty.Codecs.Http.WebSockets;
10 using DotNetty.Common.Utilities;
11 using DotNetty.Transport.Channels.Embedded;
12 using Xunit;
14 public class WebSocketFrameAggregatorTest
LocalApiJwtBearerConfigurationTest.cs (https://github.com/aspnet/AspNetCore.git) C# · 156 lines
2 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
4 using System.Collections.Generic;
5 using System.Security.Cryptography;
6 using System.Threading.Tasks;
7 using IdentityServer4.Configuration;
8 using IdentityServer4.Stores;
9 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration;
10 using Microsoft.AspNetCore.Authentication;
11 using Microsoft.AspNetCore.Authentication.JwtBearer;
15 using Moq;
16 using Xunit;
18 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
PersistedTokenCredentialsCacheTest.cs (https://github.com/Azure/iotedge.git) C# · 133 lines
2 namespace Microsoft.Azure.Devices.Edge.Hub.Core.Test
3 {
4 using System;
5 using System.Collections.Generic;
6 using System.Security.Cryptography.X509Certificates;
7 using System.Text;
8 using System.Threading.Tasks;
9 using Microsoft.Azure.Devices.Edge.Hub.Core.Identity;
10 using Microsoft.Azure.Devices.Edge.Storage;
11 using Microsoft.Azure.Devices.Edge.Util;
13 using Moq;
14 using Xunit;
16 public class PersistedTokenCredentialsCacheTest
JSCoverageTests.cs (https://github.com/kblok/puppeteer-sharp.git) C# · 175 lines
CustomInteractiveDiagnosticsFixture.cs (git://github.com/NancyFx/Nancy.git) C# · 159 lines
5 using System.Linq;
6 using Nancy.Bootstrapper;
7 using Nancy.Cookies;
8 using Nancy.Cryptography;
9 using Nancy.Culture;
10 using Nancy.Diagnostics;
11 using Nancy.Localization;
12 using Nancy.ModelBinding;
13 using Nancy.Responses.Negotiation;
14 using Nancy.Routing;
15 using Nancy.Routing.Constraints;
17 using Nancy.Tests; //While this directive is redundant, it's required to build on mono 2.x to allow it to resolve the Should* extension methods
18 using Xunit;
20 public class CustomInteractiveDiagnosticsHookFixture
RCS1221UsePatternMatchingInsteadOfAsAndNullCheckTests.cs (https://github.com/JosefPihrt/Roslynator.git) C# · 341 lines
1 // Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 using System.Threading.Tasks;
4 using Microsoft.CodeAnalysis;
5 using Microsoft.CodeAnalysis.CodeFixes;
6 using Microsoft.CodeAnalysis.Diagnostics;
7 using Roslynator.CSharp.Analysis.UsePatternMatching;
8 using Roslynator.CSharp.CodeFixes;
9 using Roslynator.CSharp.Testing;
10 using Xunit;
12 namespace Roslynator.CSharp.Analysis.Tests
PipelineStepTests.cs (https://github.com/dotnet/try.git) C# · 200 lines
2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
4 using System;
5 using System.Collections.Concurrent;
6 using System.Linq;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using Clockwise;
10 using FluentAssertions;
11 using FluentAssertions.Extensions;
12 using WorkspaceServer.Packaging;
13 using Xunit;
15 namespace WorkspaceServer.Tests
NteractKernelExtensionTests.cs (https://github.com/dotnet/interactive.git) C# · 215 lines
6 using System.Threading.Tasks;
8 using Assent;
10 using FluentAssertions;
12 using Microsoft.DotNet.Interactive.Formatting;
14 using Xunit;
15 using Xunit.Abstractions;
25 _configuration = new Configuration()
26 .SetInteractive(Debugger.IsAttached)
27 .UsingExtension("json");
28 }
53 public async Task it_can_load_script_from_the_extension()
54 {
55 using var kernel = new CompositeKernel();
57 var kernelExtension = new NteractKernelExtension();
Stream.Methods.cs (https://github.com/dotnet/runtime.git) C# · 288 lines
2 // The .NET Foundation licenses this file to you under the MIT license.
4 using System;
5 using System.Linq;
6 using System.Threading;
7 using System.Threading.Tasks;
8 using Xunit;
10 namespace System.IO.Tests
125 stream.Write(btArr, 0, iLength);
127 //we will write many things here using a binary writer
128 BinaryWriter bw1 = new BinaryWriter(stream);
129 bw1.Write(false);
DebugTestsNoListeners.cs (https://github.com/dotnet/runtime.git) C# · 230 lines
SemanticTokensEditsTests.cs (https://github.com/dotnet/roslyn.git) C# · 243 lines
7 using System.Linq;
8 using System.Threading.Tasks;
9 using Microsoft.CodeAnalysis.LanguageServer.Handler.SemanticTokens;
10 using Xunit;
11 using LSP = Microsoft.VisualStudio.LanguageServer.Protocol;
36 static class C { }";
38 using var workspace = CreateTestWorkspace(s_standardCase, out var locations);
39 var caretLocation = locations["caret"].First();
40 await RunGetSemanticTokensAsync(workspace.CurrentSolution, caretLocation);
58 @"// Comment";
60 using var workspace = CreateTestWorkspace(s_standardCase, out var locations);
61 var caretLocation = locations["caret"].First();
62 await RunGetSemanticTokensAsync(workspace.CurrentSolution, caretLocation);
MultiCharacterBraceHighlightingTests.cs (https://github.com/dotnet/roslyn.git) C# · 256 lines
3 // See the LICENSE file in the project root for more information.
5 using System.Diagnostics;
6 using System.Threading;
7 using System.Threading.Tasks;
8 using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces;
9 using Microsoft.CodeAnalysis.Test.Utilities;
10 using Microsoft.CodeAnalysis.Text;
11 using Microsoft.CodeAnalysis.UnitTests;
12 using Roslyn.Test.Utilities;
13 using Xunit;
15 namespace Microsoft.CodeAnalysis.Editor.UnitTests.BraceHighlighting
BasicPeriodBuilderFactory.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 514 lines
LazyCount.cs (https://github.com/fitzchak/ravendb.git) C# · 237 lines
2 using System.Linq;
3 using FastTests;
4 using Raven.Client;
5 using Raven.Client.Documents;
6 using Raven.Client.Documents.Indexes;
8 using Raven.Client.Documents.Session;
9 using Xunit;
11 namespace SlowTests.MailingList
35 {
36 new UserByFirstName().Execute(store);
37 using (var session = store.OpenSession())
38 {
39 session.Store(new User
FileSystemWatcher.Renamed.cs (https://gitlab.com/0072016/0072016-corefx-) C# · 219 lines
6 using System.Threading;
7 using Xunit;
9 public partial class RenamedTests
12 public static void FileSystemWatcher_Renamed_Directory()
13 {
14 using (var dir = Utility.CreateTestDirectory())
15 using (var watcher = new FileSystemWatcher("."))
103 watcher.EnableRaisingEvents = true;
105 using (var dir1 = new TemporaryTestDirectory(Path.Combine(dir.Path, "dir1")))
106 {
107 Utility.ExpectEvent(createdOccurred, "dir1 created");
111 Utility.ExpectEvent(createdOccurred, "dir2 created");
113 using (var file = Utility.CreateTestFile(Path.Combine(dir2.Path, "test file"))) { };
115 // Move the directory out of the watched folder and expect that we get a deleted event
DefaultViewFactoryFixture.cs (https://github.com/factormystic/Nancy.git) C# · 411 lines
1 namespace Nancy.Tests.Unit.ViewEngines
2 {
3 using System;
4 using System.Dynamic;
5 using System.IO;
6 using FakeItEasy;
7 using Nancy.ViewEngines;
8 using Nancy.Tests.Fakes;
9 using Xunit;
11 public class DefaultViewFactoryFixture
140 [Fact]
141 public void Should_retrieve_view_from_view_locator_using_provided_view_name()
142 {
143 // Given
DefaultBinderFixture.cs (https://github.com/factormystic/Nancy.git) C# · 483 lines
RequestStreamFixture.cs (https://github.com/factormystic/Nancy.git) C# · 545 lines
NancyEngineFixture.cs (https://github.com/factormystic/Nancy.git) C# · 456 lines
1 namespace Nancy.Tests.Unit
2 {
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 using FakeItEasy;
8 using Nancy.ErrorHandling;
9 using Nancy.Extensions;
10 using Nancy.Routing;
11 using Nancy.Tests.Fakes;
12 using Xunit;
13 using ResolveResult = System.Tuple<Nancy.Routing.Route, DynamicDictionary, System.Func<NancyContext, Response>, System.Action<NancyContext>>;
DynamicDictionaryFixture.cs (https://github.com/factormystic/Nancy.git) C# · 769 lines
1 namespace Nancy.Tests.Unit
2 {
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 using Xunit;
8 public class DynamicDictionaryFixture
63 [Fact]
64 public void Should_be_able_to_retrive_value_stores_with_dash_using_key_without_dash_when_using_indexer()
65 {
66 // Given
76 [Fact]
77 public void Should_be_able_to_retrive_value_stores_using_dash_using_key_with_dash_when_using_indexer()
78 {
79 // Given
Aspects.cs (https://github.com/fitzchak/ravendb.git) C# · 279 lines
1 using System;
2 using System.Collections.Generic;
4 using FastTests;
5 using Newtonsoft.Json;
6 using Raven.Client.Documents.Indexes;
7 using Raven.Client.Documents.Linq.Indexing;
8 using Raven.Client.Documents.Operations.Indexes;
9 using Xunit;
11 namespace SlowTests.Bugs.Stacey
33 // assert
34 using (var session = store.OpenSession())
35 {
36 // ensure optimistic concurrency
ReplicationWithMixedSecurity.cs (https://github.com/fitzchak/ravendb.git) C# · 228 lines
8 using Raven.Tests.Common.Attributes;
9 using Raven.Tests.Common.Dto;
10 using System.Collections.Generic;
11 using System.Net;
12 using System.Threading.Tasks;
14 using Raven.Client.Connection;
15 using Raven.Client.Document;
16 using Raven.Database.Server;
17 using Raven.Database.Server.Security;
18 using Raven.Database.Server.Security.Windows;
19 using Raven.Json.Linq;
20 using Raven.Tests.Helpers.Util;
22 using Xunit;
24 namespace Raven.Tests.Security
Compile.cs (https://boilen.svn.codeplex.com/svn) C# · 152 lines
WindowHtmlBuilderTests.cs (https://TelerikASPNETMVC.svn.codeplex.com/svn) C# · 221 lines
SiteMapHandlerTests.cs (https://TelerikASPNETMVC.svn.codeplex.com/svn) C# · 136 lines
VsUninstallerTest.cs (https://bitbucket.org/afrischke/nuget-global-env.git) C# · 145 lines
QueryableSortVisitorAscObjectTests.cs (https://github.com/ChilliCream/hotchocolate.git) C# · 216 lines
ConflictResolverTests.cs (https://github.com/fitzchak/ravendb.git) C# · 413 lines
3 using Raven.Server.Utils;
4 using Sparrow.Json;
5 using Sparrow.Json.Parsing;
7 using Sparrow.Threading;
8 using Xunit;
10 namespace SlowTests.Utils
32 public void CanResolveIdentical()
33 {
34 using (var ctx = new JsonOperationContext(4096, 16*1024, SharedMultipleUseFlag.None))
35 {
36 DynamicJsonValue obj1 = new DynamicJsonValue();
97 public void CanMergeAdditionalProperties()
98 {
99 using (var ctx = new JsonOperationContext(4096, 16*1024, SharedMultipleUseFlag.None))
100 {
101 DynamicJsonValue obj1 = new DynamicJsonValue();
UsingDynamicQueryWithLocalServer.cs (https://github.com/fitzchak/ravendb.git) C# · 544 lines
15 using Raven.Client.Documents.Session;
16 using Xunit;
18 namespace SlowTests.Tests.Querying
118 public void QueryForASpecificTypeDoesNotBringBackOtherTypes()
119 {
120 using (var store = GetDocumentStore())
121 {
122 using (var s = store.OpenSession())
126 }
128 using (var s = store.OpenSession())
129 {
130 var results = s.Query<Blog>()
138 [Fact]
139 public void CanPerformDynamicQueryUsingClientLuceneQuery()
140 {
141 var blogOne = new Blog
DynamicIndexesWithCollections.cs (https://github.com/fitzchak/ravendb.git) C# · 594 lines
Includes.cs (https://github.com/fitzchak/ravendb.git) C# · 552 lines
1 using System;
2 using System.Linq;
4 using FastTests;
5 using Raven.Client.Documents;
6 using Xunit;
8 namespace SlowTests.Tests.Queries
180 }
182 using (var session = store.OpenSession())
183 {
184 var orders =
205 public void can_include_by_primary_list_of_strings()
206 {
207 using (var store = GetDocumentStore())
208 {
209 using (var session = store.OpenSession())
WhereClause.cs (https://github.com/fitzchak/ravendb.git) C# · 1258 lines
5 //-----------------------------------------------------------------------
7 using System;
8 using System.Linq;
9 using FastTests;
10 using Newtonsoft.Json;
11 using Raven.Client.Documents.Linq;
12 using Raven.Client.Documents.Session;
13 using Xunit;
15 namespace SlowTests.Tests.Linq
26 public void WillRespectRenames()
27 {
28 using (var store = GetDocumentStore())
29 {
30 using (var session = store.OpenSession())
FacetsWithParameters.cs (https://github.com/fitzchak/ravendb.git) C# · 522 lines
4 using System.Linq;
5 using System.Threading.Tasks;
6 using FastTests;
9 using Raven.Client.Documents.Queries.Facets;
10 using Xunit;
12 namespace SlowTests.Tests.Faceted
185 public void FacetShouldUseParameters_WithUntypedRangeFacetList()
186 {
187 using (var store = GetDocumentStore())
188 {
189 new FooIndex().Execute(store);
228 public void FacetSetupDocument_ShouldNotUseParameters()
229 {
230 using (var store = GetDocumentStore())
231 {
232 new FooIndex().Execute(store);
FacetedIndexLimit.cs (https://github.com/fitzchak/ravendb.git) C# · 653 lines
9 using System.Linq;
10 using Raven.Client;
11 using Raven.Client.Documents;
15 using Raven.Client.Documents.Session;
16 using Xunit;
18 namespace SlowTests.Tests.Faceted
111 var facetResults = s.Query<Camera>("CameraCost")
112 .Where(x => x.DateOfListing > new DateTime(2000, 1, 1))
113 .AggregateUsing("facets/CameraFacets")
114 .Execute();
217 Setup(store);
219 using (var s = store.OpenSession())
220 {
221 s.Store(new FacetSetup { Id = "facets/CameraFacets", Facets = facets });
Aggregation.cs (https://github.com/fitzchak/ravendb.git) C# · 572 lines
5 // -----------------------------------------------------------------------
7 using System;
8 using System.Collections.Generic;
9 using System.Linq;
10 using FastTests;
11 using Raven.Client.Documents;
12 using Raven.Client.Documents.Indexes;
13 using Raven.Client.Documents.Linq;
14 using SlowTests.Core.Utils.Entities.Faceted;
15 using Sparrow;
16 using Xunit;
18 namespace SlowTests.Tests.Faceted
SmugglerApiTests.cs (https://github.com/fitzchak/ravendb.git) C# · 370 lines
3 using System.Linq;
4 using System.Threading.Tasks;
5 using FastTests;
14 using Sparrow;
15 using Xunit;
17 namespace SlowTests.Smuggler
36 public async Task CanExportDirectlyToRemote()
37 {
38 using (var store1 = GetDocumentStore(new Options
39 {
40 ModifyDatabaseName = s => $"{s}_1"
72 ModifyDatabaseName = s => $"{s}_1"
73 }))
74 using (var store2 = GetDocumentStore(new Options
75 {
76 ModifyDatabaseName = s => $"{s}_2"
FacetPaging.cs (https://github.com/fitzchak/ravendb.git) C# · 731 lines
3 using Raven.Client;
4 using Raven.Client.Documents;
5 using Raven.Client.Documents.Indexes;
8 using Raven.Client.Documents.Session;
9 using Xunit;
11 namespace SlowTests.SlowTests.Faceted
156 Setup(store);
158 using (var s = store.OpenSession())
159 {
160 s.Store(new FacetSetup { Id = "facets/CameraFacets", Facets = facets });
268 Setup(store);
270 using (var s = store.OpenSession())
271 {
272 s.Store(new FacetSetup { Id = "facets/CameraFacets", Facets = facets });
RavenDb-1934.cs (https://github.com/fitzchak/ravendb.git) C# · 461 lines
3 using FastTests;
4 using Raven.Client.Documents;
5 using Raven.Client.Documents.Indexes;
6 using Xunit;
8 namespace SlowTests.Issues
81 using (var documentStore = GetDocumentStore())
82 {
83 using (var session = documentStore.OpenSession())
84 {
85 session.Store(new Foo { Start = TimeSpan.FromHours(20), Until = TimeSpan.FromHours(30) });
175 }
177 using (var session = documentStore.OpenSession())
178 {
179 var results = session.Query<Foo>()
RavenDB-4041.cs (https://github.com/fitzchak/ravendb.git) C# · 593 lines
Advanced.cs (https://github.com/fitzchak/ravendb.git) C# · 462 lines
1 using System;
2 using System.Collections.Generic;
3 using FastTests;
4 using Raven.Client.Documents.Commands.Batches;
5 using Raven.Client.Exceptions;
6 using Raven.Client.Util;
7 using Sparrow.Json.Parsing;
8 using Xunit;
10 using Company = SlowTests.Core.Utils.Entities.Company;
11 using User = SlowTests.Core.Utils.Entities.User;
12 using Raven.Server.Documents.Replication;
ReferencedDocuments.cs (https://github.com/fitzchak/ravendb.git) C# · 490 lines
15 using SlowTests.Core.Utils.Indexes;
17 using Xunit;
19 using Company = SlowTests.Core.Utils.Entities.Company;
158 WaitForIndexing(store);
160 using (var session = store.OpenSession())
161 {
162 var users = session.Query<Users_ByCity.Result, Users_ByCity>()
184 WaitForIndexing(store);
186 using (var session = store.OpenSession())
187 {
188 var users = session.Query<Users_ByCity.Result, Users_ByCity>()
Querying.cs (https://github.com/fitzchak/ravendb.git) C# · 367 lines
1 using System.Collections.Generic;
2 using System.Linq;
3 using System.Text;
5 using FastTests;
6 using Raven.Client.Documents;
13 using Sparrow.Json;
14 using Xunit;
16 using Camera = SlowTests.Core.Utils.Entities.Camera;
33 var contact3 = new Contact { FirstName = "First Name" };
35 using (var commands = store.Commands())
36 {
37 commands.Put("contacts/1", null, contact1, new Dictionary<string, object> { { "@collection", "Contacts" } });
RevisionsTests.cs (https://github.com/fitzchak/ravendb.git) C# · 631 lines
5 //-----------------------------------------------------------------------
7 using System;
8 using System.Linq;
9 using System.Net.Http;
10 using System.Threading.Tasks;
11 using Raven.Client;
12 using Raven.Client.Documents.Conventions;
13 using Raven.Client.Documents.Operations;
14 using Raven.Client.Documents.Session;
21 using Sparrow.Json;
22 using Xunit;
24 namespace FastTests.Server.Documents.Revisions
TimeSeriesTests.cs (https://github.com/fitzchak/ravendb.git) C# · 491 lines
3 using System.Globalization;
4 using System.Linq;
5 using Raven.Abstractions.TimeSeries;
7 using Voron;
8 using Xunit;
10 namespace Raven.Tests.TimeSeries
21 var start = new DateTimeOffset(2015, 4, 1, 0, 0, 0, TimeSpan.Zero);
22 using (var r = tss.CreateReader())
23 {
24 var time = r.GetPoints("Simple", "Time", start.AddYears(-1), start.AddYears(1)).ToArray();
71 public void CanQueryDataInSpecificDurationSum()
72 {
73 using (var tss = GetStorage())
74 {
75 WriteTestData(tss);
TimeSeriesOperations.cs (https://github.com/fitzchak/ravendb.git) C# · 417 lines
8 using System.Threading.Tasks;
9 using Raven.Abstractions.Connection;
10 using Raven.Abstractions.TimeSeries;
12 using Raven.Tests.Common;
13 using Xunit;
15 namespace Raven.Tests.TimeSeries
62 public async Task SimpleAppend_ShouldFailIfTwoKeysAsDifferentValuesLength()
63 {
64 using (var store = NewRemoteTimeSeriesStore())
65 {
66 await store.CreateTypeAsync("Simple", new[] { "Value" });
98 public async Task AddAndDeleteType()
99 {
100 using (var store = NewRemoteTimeSeriesStore())
101 {
102 await store.CreateTypeAsync("Simple", new[] { "Value" });
RavenDB_2712_Replication.cs (https://github.com/fitzchak/ravendb.git) C# · 355 lines
5 // -----------------------------------------------------------------------
7 using Raven.Abstractions.Data;
8 using Raven.Abstractions.Replication;
9 using Raven.Abstractions.Util;
10 using Raven.Client.Extensions;
11 using Raven.Database.Config.Retriever;
12 using Raven.Json.Linq;
13 using Raven.Tests.Common;
15 using Xunit;
17 namespace Raven.Tests.Issues.RavenDB_2712
RavenDB_1379_Client_Remote.cs (https://github.com/fitzchak/ravendb.git) C# · 655 lines
3 using System.Linq;
5 using Raven.Client;
6 using Raven.Json.Linq;
7 using Raven.Tests.Common;
9 using Xunit;
10 using Xunit.Extensions;
18 public void PagingWithoutFilters(string requestedStorage)
19 {
20 using (var documentStore = NewRemoteDocumentStore(requestedStorage: requestedStorage))
21 {
22 documentStore.DatabaseCommands.Put("FooBar1", null, new RavenJObject(), new RavenJObject());
139 public void PagingWithoutFiltersAsync(string requestedStorage)
140 {
141 using (var documentStore = NewRemoteDocumentStore(requestedStorage: requestedStorage))
142 {
143 documentStore.DatabaseCommands.Put("FooBar1", null, new RavenJObject(), new RavenJObject());
RavenDB_1379_Client_Lazy.cs (https://github.com/fitzchak/ravendb.git) C# · 654 lines
4 using Raven.Client;
5 using Raven.Json.Linq;
6 using Raven.Tests.Common;
8 using Xunit;
9 using Xunit.Extensions;
145 }
147 using (var session = documentStore.OpenSession())
148 {
149 var fetchedDocuments = session.Advanced.Lazily
249 public void PagingWithoutFiltersWithPagingInformation_Remote(string requestedStorage)
250 {
251 using (var documentStore = NewRemoteDocumentStore(requestedStorage: requestedStorage))
252 {
253 using (var session = documentStore.OpenSession())
RavenDB_1379_Client.cs (https://github.com/fitzchak/ravendb.git) C# · 702 lines
4 using Raven.Client;
5 using Raven.Json.Linq;
6 using Raven.Tests.Common;
8 using Xunit;
9 using Xunit.Extensions;
77 public void PagingWithoutFiltersWithPagingInformation(string requestedStorage)
78 {
79 using (var documentStore = NewDocumentStore(requestedStorage: requestedStorage))
80 {
81 documentStore.SystemDatabase.Documents.Put("FooBar1", null, new RavenJObject(), new RavenJObject(), null);
213 public void PagingWithoutFiltersWithPagingInformationAsync(string requestedStorage)
214 {
215 using (var documentStore = NewDocumentStore(requestedStorage: requestedStorage))
216 {
217 documentStore.SystemDatabase.Documents.Put("FooBar1", null, new RavenJObject(), new RavenJObject(), null);
RavenDB_1379.cs (https://github.com/fitzchak/ravendb.git) C# · 357 lines
1 using System.Linq;
2 using System.Threading;
4 using Raven.Json.Linq;
5 using Raven.Tests.Common;
7 using Xunit;
8 using Xunit.Extensions;
16 public void PagingWithoutFilters(string requestedStorage)
17 {
18 using (var documentStore = NewDocumentStore(requestedStorage: requestedStorage))
19 {
20 documentStore.SystemDatabase.Documents.Put("FooBar1", null, new RavenJObject(), new RavenJObject(), null);
RavenDb_1977.cs (https://github.com/fitzchak/ravendb.git) C# · 632 lines
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using Raven.Abstractions.Data;
5 using Raven.Client;
6 using Raven.Json.Linq;
7 using Raven.Tests.Common;
8 using Xunit;
10 namespace Raven.Tests.Issues
311 }
313 using (var session = store.OpenSession())
314 {
315 var userdata1 = session.Load<UserData>("UserDatas/1");
RavenDB_3573.cs (https://github.com/fitzchak/ravendb.git) C# · 437 lines
3 using System.Threading;
4 using System.Threading.Tasks;
5 using Raven.Abstractions.Data;
10 using Raven.Tests.Common;
11 using Xunit;
13 namespace Raven.Tests.Issues
72 using(var source = CreateStore())
73 using (var destination = CreateStore())
74 {
75 var testIndex = new UserIndex();
291 var destinationDatabase = await servers[1].Server.GetDatabaseInternal(destination.DefaultDatabase);
293 using (var session = source.OpenSession())
294 {
295 session.Store(new User
RavenDB_3484.cs (https://github.com/fitzchak/ravendb.git) C# · 385 lines
8 using System.Threading;
9 using Raven.Abstractions.Data;
10 using Raven.Abstractions.Exceptions.Subscriptions;
11 using Raven.Client.Document;
12 using Raven.Tests.Common;
13 using Raven.Tests.Common.Dto;
14 using Xunit;
15 using Xunit.Extensions;
74 subscriptions[i].AfterAcknowledgment += x => batchAcknowledged = true;
76 using (var s = store.OpenSession())
77 {
78 s.Store(new User());
103 public void ShouldReplaceActiveClientWhen_ForceAndKeep_StrategyIsUsed(string storage)
104 {
105 using (var store = NewDocumentStore(requestedStorage: storage))
106 {
107 foreach (var strategyToReplace in new[] { SubscriptionOpeningStrategy.OpenIfFree, SubscriptionOpeningStrategy.TakeOver, SubscriptionOpeningStrategy.WaitForFree })
RavenDB_1601.cs (https://github.com/fitzchak/ravendb.git) C# · 514 lines
8 using Raven.Abstractions.Data;
9 using Raven.Abstractions.Indexing;
10 using Raven.Client;
16 using Raven.Tests.Common;
18 using Xunit;
19 using Raven.Client.Linq;
73 using (var store = NewRemoteDocumentStore())
74 {
75 using (var s = store.OpenSession())
76 {
77 s.Store(new ScriptedIndexResults
169 using (var store = NewDocumentStore())
170 {
171 using (var s = store.OpenSession())
172 {
173 s.Store(new ScriptedIndexResults
RavenDB_1353.cs (https://github.com/fitzchak/ravendb.git) C# · 368 lines
4 // </copyright>
5 // -----------------------------------------------------------------------
6 using System.Collections.Generic;
7 using System.Linq;
8 using Raven.Abstractions.Data;
9 using Raven.Client.Embedded;
10 using Raven.Client.Indexes;
11 using Raven.Tests.Common;
13 using Xunit;
15 namespace Raven.Tests.Issues
RavenDB_1333.cs (https://github.com/fitzchak/ravendb.git) C# · 463 lines
14 using Raven.Client.Document;
16 using Xunit;
18 public class RavenDB_1333 : RavenTest
182 using (var store = NewRemoteDocumentStore())
183 {
184 using (var session = store.OpenSession())
185 {
186 session.Store(new Person());
216 public void ForDocumentsOfTypeEmbedded1()
217 {
218 using (var store = NewDocumentStore())
219 {
220 var list = new BlockingCollection<DocumentChangeNotification>();
RavenDB_1302.cs (https://github.com/fitzchak/ravendb.git) C# · 554 lines
4 // </copyright>
5 // -----------------------------------------------------------------------
6 using System;
7 using System.Globalization;
8 using System.Threading;
9 using Raven.Client;
10 using Raven.Client.Document;
11 using Raven.Tests.Common;
12 using Raven.Tests.Common.Util;
13 using Xunit;
15 namespace Raven.Tests.Issues
24 public void FirstOrDefaultShouldSetPageSizeToOne()
25 {
26 using (var store = NewRemoteDocumentStore())
27 {
28 store.InitializeProfiling();
RavenDB-4153.cs (https://github.com/fitzchak/ravendb.git) C# · 403 lines
8 using System.Threading;
9 using Raven.Abstractions.Data;
10 using Raven.Abstractions.Indexing;
15 using Raven.Tests.Common;
16 using Xunit;
17 using Xunit.Extensions;
27 public void can_change_reduce_key_leaving_correct_stats1(string storageType)
28 {
29 using (var store = NewRemoteDocumentStore(requestedStorage: storageType))
30 {
31 using (var session = store.OpenSession())
169 Assert.Equal("companies/1", results[0].Key);
171 using (var session = store.OpenSession())
172 {
173 session.Delete("orders/3");
RavenDB-3152.cs (https://github.com/fitzchak/ravendb.git) C# · 479 lines
2 using System.Linq;
3 using System.Threading.Tasks;
4 using Raven.Abstractions.Data;
5 using Raven.Abstractions.Indexing;
6 using Raven.Abstractions.Smuggler;
13 using Raven.Tests.Helpers;
14 using Xunit;
16 namespace Raven.Tests.Issues
100 });
102 using (var store2 = new DocumentStore
103 {
104 Url = server.SystemDatabase.Configuration.ServerUrl,
AutomaticConflictResolutions.cs (https://github.com/fitzchak/ravendb.git) C# · 374 lines
4 // </copyright>
5 // -----------------------------------------------------------------------
6 using System;
7 using System.IO;
8 using System.Text;
9 using System.Threading;
10 using System.Threading.Tasks;
11 using Raven.Abstractions.FileSystem;
12 using Raven.Abstractions.Replication;
13 using Raven.Client.FileSystem;
14 using Raven.Database.FileSystem.Synchronization;
15 using Raven.Database.FileSystem.Synchronization.Multipart;
18 using Raven.Tests.Helpers;
19 using Xunit;
20 using FileSystemInfo = Raven.Abstractions.FileSystem.FileSystemInfo;
FileTests.cs (https://github.com/fitzchak/ravendb.git) C# · 825 lines
8 using System.Linq;
9 using Raven.Abstractions.Data;
10 using Raven.Abstractions.Util;
12 using Raven.Json.Linq;
13 using Xunit;
14 using Xunit.Extensions;
196 public void CompleteFileUpload(string requestedStorage)
197 {
198 using (var storage = NewTransactionalStorage(requestedStorage))
199 {
200 storage.Batch(accessor => Assert.Throws<FileNotFoundException>(() => accessor.CompleteFileUpload("file1")));
467 public void RenameFile2(string requestedStorage)
468 {
469 using (var storage = NewTransactionalStorage(requestedStorage))
470 {
471 storage.Batch(accessor => accessor.PutFile("file1", null, new RavenJObject()));
ConfigTests.cs (https://github.com/fitzchak/ravendb.git) C# · 431 lines
6 using System.Collections.Specialized;
7 using System.IO;
8 using System.Linq;
9 using Raven.Abstractions.Extensions;
10 using Xunit;
11 using Xunit.Extensions;
23 public void ConfigExists(string requestedStorage)
24 {
25 using (var storage = NewTransactionalStorage(requestedStorage))
26 {
27 storage.Batch(accessor => Assert.False(accessor.ConfigExists("config1")));
100 public void GetConfig(string requestedStorage)
101 {
102 using (var storage = NewTransactionalStorage(requestedStorage))
103 {
104 storage.Batch(accessor => Assert.Throws<FileNotFoundException>(() => accessor.GetConfig("config1")));
FileSessionListenersTests.cs (https://github.com/fitzchak/ravendb.git) C# · 512 lines
3 using Raven.Client.FileSystem;
4 using Raven.Client.FileSystem.Extensions;
5 using Raven.Client.FileSystem.Listeners;
6 using Raven.Json.Linq;
7 using System;
8 using System.Linq;
12 using System.Threading.Tasks;
14 using Xunit;
16 namespace Raven.Tests.FileSystem.ClientApi
247 using (var sessionDestination1 = store.OpenAsyncSession())
248 using (var sessionDestination2 = anotherStore.OpenAsyncSession())
249 {
FileQueryTests.cs (https://github.com/fitzchak/ravendb.git) C# · 1138 lines
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
8 using Raven.Tests.Common;
9 using Xunit;
10 using Xunit.Extensions;
158 var store = this.NewStore();
160 using (var session = store.OpenAsyncSession())
161 {
162 session.RegisterUpload("test.file", CreateUniformFileStream(10));
309 var store = this.NewStore();
311 using (var session = store.OpenAsyncSession())
312 {
313 session.RegisterUpload("test.file", CreateUniformFileStream(10));
VersioningTests.cs (https://github.com/fitzchak/ravendb.git) C# · 637 lines
5 // -----------------------------------------------------------------------
7 using System.IO;
8 using System.Linq;
9 using System.Threading.Tasks;
10 using Raven.Abstractions.Connection;
11 using Raven.Abstractions.Data;
12 using Raven.Abstractions.Exceptions;
13 using Raven.Abstractions.FileSystem;
14 using Raven.Client.FileSystem.Bundles.Versioning;
18 using Raven.Tests.Common;
20 using Xunit;
21 using Xunit.Extensions;
VersioningAndSynchronization.cs (https://github.com/fitzchak/ravendb.git) C# · 343 lines
8 using Raven.Abstractions.FileSystem;
9 using Raven.Client.FileSystem.Bundles.Versioning;
10 using Raven.Client.FileSystem.Extensions;
15 using Raven.Tests.Helpers;
16 using Xunit;
17 using Xunit.Extensions;
110 await source.AsyncFilesCommands.Synchronization.StartAsync("file.txt", destination.AsyncFilesCommands);
112 using (var dstSession = destination.OpenAsyncSession())
113 {
114 Assert.NotNull(await dstSession.LoadFileAsync("file.txt"));
142 await source.AsyncFilesCommands.Synchronization.StartAsync("file.txt", destination.AsyncFilesCommands);
144 using (var dstSession = destination.OpenAsyncSession())
145 {
146 Assert.NotNull(await dstSession.LoadFileAsync("file.txt"));
SmugglerTests.cs (https://github.com/fitzchak/ravendb.git) C# · 394 lines
3 using System.Linq;
4 using System.Net;
5 using System.Threading;
13 using Raven.Database.Smuggler;
14 using Xunit;
16 namespace Raven.Tests.Counters
40 }
42 using (var counterStore = NewRemoteCountersStore("storeX", ravenServer: server))
43 {
44 ConfigureApiKey(server.SystemDatabase, "test", "ThisIsMySecret", counterStore.Name, true);
61 using (var serverA = GetNewServer(port: 8010,configureConfig: ConfigureServerForAuth))
62 using (var serverB = GetNewServer(port: 8011, configureConfig: ConfigureServerForAuth))
63 {
64 using (var counterStoreA = NewRemoteCountersStore("storeX", ravenServer: serverA))
Versioning.cs (https://github.com/fitzchak/ravendb.git) C# · 559 lines
4 // </copyright>
5 //-----------------------------------------------------------------------
6 using System.IO;
7 using System.Threading.Tasks;
8 using Raven.Abstractions.Commands;
9 using Raven.Abstractions.Connection;
10 using Raven.Abstractions.Data;
11 using Raven.Abstractions.Smuggler;
12 using Raven.Bundles.Versioning.Data;
13 using Raven.Client.Bundles.Versioning;
14 using Raven.Smuggler;
15 using Xunit;
17 namespace Raven.Tests.Bundles.Versioning
CascadeDelete.cs (https://github.com/fitzchak/ravendb.git) C# · 398 lines
14 using Raven.Tests.Common;
16 using Xunit;
18 namespace Raven.Tests.Bundles.CascadeDelete
121 using (var session = documentStore.OpenSession())
122 {
123 session.Delete<CascadeTester>(session.Load<CascadeTester>(master.Id));
149 // assert initial creation
150 using (var session = documentStore.OpenSession())
151 {
152 // assert master created
CanHandleAuthQuestions.cs (https://github.com/fitzchak/ravendb.git) C# · 650 lines
7 using Raven.Bundles.Authorization;
9 using Xunit;
11 namespace Raven.Tests.Bundles.Authorization
29 Name = "Hibernating Rhinos"
30 };
31 using (var s = store.OpenSession(DatabaseName))
32 {
33 s.Store(new client::Raven.Bundles.Authorization.Model.AuthorizationUser
312 }
314 using (var s = store.OpenSession(DatabaseName))
315 {
316 var authorizationUser = s.Load<client::Raven.Bundles.Authorization.Model.AuthorizationUser>(userId);
StalenessStorageActionsTests.cs (https://github.com/fitzchak/ravendb.git) C# · 366 lines
MappedResultsStorageActionsTests.cs (https://github.com/fitzchak/ravendb.git) C# · 1066 lines
8 using System.Threading;
9 using Raven.Abstractions.Data;
10 using Raven.Database.Indexing;
14 using Sparrow.Collections;
15 using Xunit;
16 using Xunit.Extensions;
82 public void IncrementReduceKeyCounter(string requestedStorage)
83 {
84 using (var storage = NewTransactionalStorage(requestedStorage))
85 {
86 storage.Batch(accessor => accessor.MapReduce.IncrementReduceKeyCounter(303, "reduceKey1", 7));
776 public void GetKeysForIndexForDebug2(string requestedStorage)
777 {
778 using (var storage = NewTransactionalStorage(requestedStorage))
779 {
780 storage.Batch(accessor =>
ListStorageActionsTests.cs (https://github.com/fitzchak/ravendb.git) C# · 509 lines
8 using Raven.Abstractions;
9 using Raven.Tests.Common;
11 namespace Raven.Tests.Storage.Voron
12 {
13 using System.Linq;
15 using Raven.Abstractions.Data;
17 using Raven.Json.Linq;
19 using Xunit;
20 using Xunit.Extensions;
48 public void CanAddTwoIdenticalKeys(string requestedStorage)
49 {
50 using (var storage = NewTransactionalStorage(requestedStorage))
51 {
52 storage.Batch(accessor => accessor.Lists.Set("name1", "key1", new RavenJObject { { "data", "123" } }, UuidType.ReduceResults));
IndexingStorageActionsTests.cs (https://github.com/fitzchak/ravendb.git) C# · 490 lines
10 namespace Raven.Tests.Storage.Voron
11 {
12 using System;
13 using System.Collections.Generic;
14 using System.Linq;
15 using System.Threading;
21 using Raven.Database.Indexing;
23 using Xunit;
24 using Xunit.Extensions;
362 public void UpdateIndexingStats(string requestedStorage)
363 {
364 using (var storage = NewTransactionalStorage(requestedStorage))
365 {
366 storage.Batch(accessor => accessor.Indexing.AddIndex(101, true));
TasksStorageActionsTests.cs (https://github.com/fitzchak/ravendb.git) C# · 574 lines
9 using Raven.Abstractions.Data;
10 using Raven.Tests.Common;
12 namespace Raven.Tests.Storage
15 using Database.Tasks;
16 using Xunit;
17 using Xunit.Extensions;
24 public void SimpleTask(string requestedStorage)
25 {
26 using (var storage = NewTransactionalStorage(requestedStorage))
27 {
28 storage.Batch(accessor => accessor.Tasks.AddTask(new RemoveFromIndexTask(101), DateTime.Now));
114 public void CanAddAndRemoveMultipleTasks_DifferentTypes(string requestedStorage)
115 {
116 using (var storage = NewTransactionalStorage(requestedStorage))
117 {
118 storage.Batch(actions =>
SmugglerIdentitiesTests.cs (https://github.com/fitzchak/ravendb.git) C# · 370 lines
8 using System.Linq;
9 using System.Threading.Tasks;
11 using Raven.Abstractions.Data;
12 using Raven.Abstractions.Smuggler;
13 using Raven.Database.Smuggler;
16 using Raven.Tests.Common;
18 using Xunit;
20 namespace Raven.Tests.Smuggler
39 using (var store = NewDocumentStore())
40 {
41 using (var session = store.OpenSession())
42 {
43 session.Store(new Foo { Name = "N1" });
TransformerReplication.cs (https://github.com/fitzchak/ravendb.git) C# · 696 lines
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Threading;
5 using System.Threading.Tasks;
7 using Raven.Abstractions.Connection;
8 using Raven.Abstractions.Data;
9 using Raven.Abstractions.Indexing;
18 using Raven.Tests.Helpers;
20 using Xunit;
22 namespace Raven.Tests.Replication
MultiGetCaching.cs (https://github.com/fitzchak/ravendb.git) C# · 398 lines
HighlightTesting.cs (https://github.com/fitzchak/ravendb.git) C# · 436 lines
3 using Raven.Abstractions.Indexing;
4 using Raven.Client;
5 using Raven.Client.Indexes;
6 using Raven.Tests.Common;
8 using Xunit;
10 namespace Raven.Tests.Indexes
81 using (var store = NewDocumentStore())
82 using (var session = store.OpenSession())
83 {
84 session.Store(item);
290 var searchFor = "dog";
291 using (var store = NewDocumentStore())
292 using (var session = store.OpenSession())
Game.cs (https://github.com/fitzchak/ravendb.git) C# · 444 lines
5 //-----------------------------------------------------------------------
7 using System;
8 using System.Linq;
9 using Raven.Abstractions.Indexing;
10 using Raven.Client;
11 using Raven.Client.Embedded;
12 using Raven.Client.Indexes;
13 using Raven.Tests.Common;
15 using Xunit;
17 namespace Raven.Tests.Document
FullTextSearchOnTags.cs (https://github.com/fitzchak/ravendb.git) C# · 518 lines
1 using System.Collections.Generic;
2 using Raven.Abstractions.Data;
3 using Raven.Abstractions.Indexing;
4 using Raven.Client;
5 using Raven.Tests.Common;
7 using Xunit;
8 using Raven.Client.Linq;
9 using System.Linq;
11 namespace Raven.Tests.Bugs
23 [Fact]
24 public void CanSearchUsingPhrase()
25 {
26 using (var store = NewDocumentStore())
RavenDB_1603.cs (https://github.com/fitzchak/ravendb.git) C# · 953 lines
5 // -----------------------------------------------------------------------
7 using System;
8 using System.Collections.Generic;
9 using System.ComponentModel.Composition.Hosting;
10 using System.IO;
11 using System.IO.Compression;
12 using System.Linq;
31 using Raven.Tests.Common.Util;
33 using Xunit;
35 namespace Raven.SlowTests.Issues