Skip to content

Create NS_TimeZoneConverterTest#8

Open
nazariyskoropad wants to merge 13 commits into
asdfrom
master
Open

Create NS_TimeZoneConverterTest#8
nazariyskoropad wants to merge 13 commits into
asdfrom
master

Conversation

@nazariyskoropad

Copy link
Copy Markdown

using NUnit.Framework;
using System;

namespace TestProject1.TimeZoneConverter
{
[TestFixture]
public class TimeZoneConverterTest
{
[Test]
public void CheckConvertToEst()
{
//arrange
var currentTime = DateTime.Now;
TimeZoneInfo easternZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
var expectedResult = TimeZoneInfo.ConvertTime(currentTime, TimeZoneInfo.Local, easternZone);

        //act
        var actualResult = TimeZoneConverter.ConvertToEst(currentTime);

        //assert
        Assert.AreEqual(expectedResult, actualResult);
    }

    [Test]
    public void CheckConvertToUts()
    {           
        //arrange
        var currentTime = DateTime.Now;
        var expectedResult = TimeZoneInfo.ConvertTimeToUtc(currentTime);

        //act
        var actualResult = TimeZoneConverter.ConvertToUtc(currentTime);

        //assert
        Assert.AreEqual(expectedResult, actualResult);
    }
}

}

@aceofbase199 aceofbase199 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one file should be added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants