From b96d8f063efa5af56e7ad75fe78cbdc7ea1846fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Tre=C5=9Bci=C5=84ski?= Date: Sat, 28 Oct 2017 21:24:53 +0200 Subject: [PATCH] Update the license file to have the correct date range #46; Add a unittest to check the license.md file date range #47 --- LICENSE.txt | 2 +- UnitTest/UnitTest.cs | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index c1631d6..53c76d3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 SendGrid, Inc. +Copyright (c) 2012-2017 SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/UnitTest/UnitTest.cs b/UnitTest/UnitTest.cs index d0a224a..95170fb 100644 --- a/UnitTest/UnitTest.cs +++ b/UnitTest/UnitTest.cs @@ -7,6 +7,8 @@ using System.Text; using System.Net; using System.Threading; +using System.IO; +using System.Linq; namespace UnitTest { @@ -95,4 +97,16 @@ public async void TestMethodCallWithCancellationToken() Response response = await test_client.get(cancellationToken: cancellationTokenSource.Token); } } + + [TestFixture] + public class TestRepositoryFiles + { + [Test] + public void TestLicenseEndYear() + { + string line = File.ReadLines(@"..\..\..\LICENSE.txt").Skip(2).Take(1).First(); + + Assert.AreEqual(DateTime.Now.Year.ToString(), line.Substring(19, 4)); + } + } }