@@ -28,7 +28,7 @@ public void CanTellIfObjectsExists(string sha, bool shouldExists)
28
28
[ Fact ]
29
29
public void CanCreateABlobFromAFileInTheWorkingDirectory ( )
30
30
{
31
- string path = CloneStandardTestRepo ( ) ;
31
+ string path = InitNewRepository ( ) ;
32
32
using ( var repo = new Repository ( path ) )
33
33
{
34
34
Assert . Equal ( FileStatus . Nonexistent , repo . Index . RetrieveStatus ( "hello.txt" ) ) ;
@@ -51,7 +51,7 @@ public void CanCreateABlobFromAFileInTheWorkingDirectory()
51
51
[ Fact ]
52
52
public void CanCreateABlobIntoTheDatabaseOfABareRepository ( )
53
53
{
54
- string path = CloneBareTestRepo ( ) ;
54
+ string path = InitNewRepository ( ) ;
55
55
56
56
SelfCleaningDirectory directory = BuildSelfCleaningDirectory ( ) ;
57
57
@@ -83,7 +83,7 @@ public void CanCreateABlobIntoTheDatabaseOfABareRepository()
83
83
[ InlineData ( "e9671e138a780833cb689753570fd10a55be84fb" , "dummy.guess" ) ]
84
84
public void CanCreateABlobFromAStream ( string expectedSha , string hintPath )
85
85
{
86
- string path = CloneBareTestRepo ( ) ;
86
+ string path = InitNewRepository ( ) ;
87
87
88
88
var sb = new StringBuilder ( ) ;
89
89
for ( int i = 0 ; i < 6 ; i ++ )
@@ -114,7 +114,7 @@ public void CanCreateABlobFromAStream(string expectedSha, string hintPath)
114
114
[ InlineData ( 8192 , 4097 ) ]
115
115
public void CanCreateABlobFromAStreamWithANumberOfBytesToConsume ( int contentSize , int numberOfBytesToConsume )
116
116
{
117
- string path = CloneBareTestRepo ( ) ;
117
+ string path = InitNewRepository ( ) ;
118
118
119
119
var sb = new StringBuilder ( ) ;
120
120
for ( int i = 0 ; i < contentSize ; i ++ )
@@ -135,10 +135,12 @@ public void CanCreateABlobFromAStreamWithANumberOfBytesToConsume(int contentSize
135
135
[ Fact ]
136
136
public void CreatingABlobFromANonReadableStreamThrows ( )
137
137
{
138
- string path = CloneStandardTestRepo ( ) ;
138
+ string path = InitNewRepository ( ) ;
139
139
140
- using ( var stream = new FileStream ( Path . Combine ( path , "file.txt" ) , FileMode . CreateNew , FileAccess . Write ) )
141
140
using ( var repo = new Repository ( path ) )
141
+ using ( var stream = new FileStream (
142
+ Path . Combine ( repo . Info . WorkingDirectory , "file.txt" ) ,
143
+ FileMode . CreateNew , FileAccess . Write ) )
142
144
{
143
145
Assert . Throws < ArgumentException > ( ( ) => repo . ObjectDatabase . CreateBlob ( stream ) ) ;
144
146
}
@@ -218,7 +220,7 @@ public void RemovingANonExistingEntryFromATreeDefinitionHasNoSideEffect()
218
220
[ Fact ]
219
221
public void CanCreateAnEmptyTree ( )
220
222
{
221
- string path = CloneBareTestRepo ( ) ;
223
+ string path = InitNewRepository ( ) ;
222
224
using ( var repo = new Repository ( path ) )
223
225
{
224
226
var td = new TreeDefinition ( ) ;
@@ -364,7 +366,7 @@ public void CanCreateABinaryBlobFromAStream()
364
366
{
365
367
var binaryContent = new byte [ ] { 0 , 1 , 2 , 3 , 4 , 5 } ;
366
368
367
- string path = CloneBareTestRepo ( ) ;
369
+ string path = InitNewRepository ( ) ;
368
370
using ( var repo = new Repository ( path ) )
369
371
{
370
372
using ( var stream = new MemoryStream ( binaryContent ) )
0 commit comments