Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 8b374c1

Browse files
author
John Kordich
committed
Removing DateTime test. Bad test: relies on local time zone and doesnt test much
1 parent 786c521 commit 8b374c1

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

test/Microsoft.Management.Infrastructure.Tests/UnitTests/CimInstanceTest.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -466,25 +466,6 @@ public void Properties_Add_ValueAndType_DateTime_DateTime_MaxValue()
466466
Assert.Equal(CimType.DateTime, addedProperty.CimType, "addedProperty.CimType is not correct");
467467
}
468468

469-
[Fact]
470-
public void Properties_Add_ValueAndType_DateTime_DateTime_AlmostMaxValue()
471-
{
472-
DateTime maxValidCimTimestampUtc = new DateTime(3155378975999999990, DateTimeKind.Utc);
473-
DateTime maxValidCimTimestampLocal = TimeZoneInfo.ConvertTime(maxValidCimTimestampUtc, TimeZoneInfo.Local);
474-
475-
DateTime myDate = DateTime.MaxValue.Subtract(TimeSpan.FromSeconds(1));
476-
CimInstance cimInstance = new CimInstance("MyClassName");
477-
CimProperty cimProperty = CimProperty.Create("MyPropertyName", myDate, CimType.DateTime, CimFlags.None);
478-
cimInstance.CimInstanceProperties.Add(cimProperty);
479-
480-
CimProperty addedProperty = cimInstance.CimInstanceProperties.Single();
481-
Assert.NotNull(addedProperty.Value, "addedProperty.Value is null");
482-
Assert.True(addedProperty.Value is DateTime, "addedProperty.Value.GetType() is not correct");
483-
DateTime value = (DateTime)addedProperty.Value;
484-
Assert.Equal(maxValidCimTimestampLocal.Ticks, value.Ticks, "addedProperty.Value is not correct");
485-
Assert.Equal(CimType.DateTime, addedProperty.CimType, "addedProperty.CimType is not correct");
486-
}
487-
488469
[Fact]
489470
public void Properties_Add_ValueAndType_DateTime_TimeSpan_InTicks()
490471
{

0 commit comments

Comments
 (0)