Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/ServiceStack.Text.Tests/HttpUtilsMockTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void Can_Mock_Bytes_Api_responses()
[Test]
public void Can_Mock_UploadFile()
{
const string tempTextPath = @"c:\Windows\Temp\test.txt";
string tempTextPath = Path.Combine (Path.GetTempPath (), "test.txt");
using (File.CreateText(tempTextPath)){}

var fileNamesUploaded = new List<string>();
Expand Down Expand Up @@ -114,4 +114,4 @@ public void Can_Mock_BytesFn_Api_responses()
}

}
}
}
10 changes: 6 additions & 4 deletions tests/ServiceStack.Text.Tests/ReportedIssues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public class TextTags
[Test]
public void Can_serialize_sweedish_chars()
{
var dto = new TextTags { Text = "Olle �r en �L �l", Tags = new[] { "�l", "�l", "m�l" } };
var dto = new TextTags { Text = "Olle är en ÖL ål", Tags = new[] { "öl", "ål", "mål" } };
Serialize(dto);
}

Expand Down Expand Up @@ -246,8 +246,9 @@ public void Comma_In_String_Does_Not_Cause_NewLine()
var test = new Test { TestString = "$100,000" };

var serialized = test.Dump();
var lf = Environment.NewLine;

Assert.That(serialized, Is.EqualTo("{\r\n\tTestString: \"$100,000\"\r\n}"));
Assert.That(serialized, Is.EqualTo("{"+lf+"\tTestString: \"$100,000\""+lf+"}"));
}

[Test]
Expand All @@ -260,8 +261,9 @@ public void Literal_Quote_In_String_Does_Not_Ignore_Comma()
};

var serialized = test.Dump();
var lf = Environment.NewLine;

Assert.That(serialized, Is.EqualTo("{\r\n\tTestString: \"test\"\"\",\r\n\tOtherString: \"$100,000\"\r\n}"));
Assert.That(serialized, Is.EqualTo("{"+lf+"\tTestString: \"test\"\"\","+lf+"\tOtherString: \"$100,000\""+lf+"}"));
}

[Test]
Expand Down Expand Up @@ -337,4 +339,4 @@ public class TestMappedList

public List<int?> IntArrayProp { get; set; }
}
}
}