Skip to content

Commit be26999

Browse files
committed
Remove weird tests
1 parent 74e54cf commit be26999

File tree

1 file changed

+3
-73
lines changed

1 file changed

+3
-73
lines changed

UnitsNet.Tests/CustomCode/ParseTests.cs

Lines changed: 3 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// Copyright (c) 2013 Andreas Gullberg Larsen ([email protected]).
22
// https://github.com/angularsen/UnitsNet
3-
//
3+
//
44
// Permission is hereby granted, free of charge, to any person obtaining a copy
55
// of this software and associated documentation files (the "Software"), to deal
66
// in the Software without restriction, including without limitation the rights
77
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
88
// copies of the Software, and to permit persons to whom the Software is
99
// furnished to do so, subject to the following conditions:
10-
//
10+
//
1111
// The above copyright notice and this permission notice shall be included in
1212
// all copies or substantial portions of the Software.
13-
//
13+
//
1414
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1515
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1616
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -62,20 +62,6 @@ public void ParseLength_InvalidString_USEnglish_ThrowsException(string s, Type e
6262
Assert.Throws(expectedExceptionType, () => Length.Parse(s, usEnglish));
6363
}
6464

65-
[Theory]
66-
[InlineData("1 ft 1 in", 13)]
67-
[InlineData("1ft 1in", 13)]
68-
[InlineData("1' 1\"", 13)]
69-
[InlineData("1'1\"", 13)]
70-
[InlineData("1ft1in", 13)]
71-
[InlineData("1ft and 1in", 13)]
72-
public void ParseLength_FeetInchesString_USEnglish(string s, double expected)
73-
{
74-
CultureInfo usEnglish = new CultureInfo("en-US");
75-
double actual = Length.Parse(s, usEnglish).Inches;
76-
Assert.Equal(expected, actual);
77-
}
78-
7965
/// <exception cref="UnitsNetException">Error parsing string.</exception>
8066
[Theory]
8167
[InlineData("5.5 m", 5.5)]
@@ -166,61 +152,5 @@ public void TryParseLengthUnitUsEnglish(string s, bool expected)
166152
bool actual = Length.TryParse(s, usEnglish, out Length _);
167153
Assert.Equal(expected, actual);
168154
}
169-
170-
[Theory]
171-
[InlineData("!")]
172-
[InlineData("@")]
173-
[InlineData("#")]
174-
[InlineData("$")]
175-
[InlineData("%")]
176-
[InlineData("^")]
177-
[InlineData("&")]
178-
[InlineData("*")]
179-
[InlineData("-")]
180-
[InlineData("_")]
181-
[InlineData("?")]
182-
[InlineData("123")]
183-
[InlineData(" ")]
184-
public void TryParseLengthUnitAbbreviationSpecialCharacters(string s)
185-
{
186-
string abbrev = $"m{s}s";
187-
188-
UnitAbbreviationsCache.Default.MapUnitToAbbreviation(LengthUnit.Meter, abbrev);
189-
190-
// Act
191-
bool ok = UnitParser.Default.TryParse(abbrev, out LengthUnit result);
192-
193-
// Assert
194-
Assert.True(ok, "TryParse " + abbrev);
195-
Assert.Equal(LengthUnit.Meter, result);
196-
}
197-
198-
[Theory]
199-
[InlineData("!")]
200-
[InlineData("@")]
201-
[InlineData("#")]
202-
[InlineData("$")]
203-
[InlineData("%")]
204-
[InlineData("^")]
205-
[InlineData("&")]
206-
[InlineData("*")]
207-
[InlineData("-")]
208-
[InlineData("_")]
209-
[InlineData("?")]
210-
[InlineData("123")]
211-
[InlineData(" ")]
212-
public void TryParseLengthSpecialCharacters(string s)
213-
{
214-
string abbrev = $"m{s}s";
215-
216-
UnitAbbreviationsCache.Default.MapUnitToAbbreviation(LengthUnit.Meter, abbrev);
217-
218-
// Act
219-
var ok = Length.TryParse($"10 {abbrev}", out var result);
220-
221-
// Assert
222-
Assert.True(ok, $"TryParse \"10 {abbrev}\"");
223-
Assert.Equal(10, result.Meters);
224-
}
225155
}
226156
}

0 commit comments

Comments
 (0)