Syncing
This commit is contained in:
@@ -1 +1 @@
|
||||
bob
|
||||
gigasecond
|
29
csharp/gigasecond/GigasecondTest.cs
Normal file
29
csharp/gigasecond/GigasecondTest.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
[TestFixture]
|
||||
public class GigasecondTest
|
||||
{
|
||||
[Test]
|
||||
public void First_date()
|
||||
{
|
||||
var date = Gigasecond.Date(new DateTime(2011, 4, 25, 0, 0, 0, DateTimeKind.Utc));
|
||||
Assert.That(date, Is.EqualTo(new DateTime(2043, 1, 1, 1, 46, 40, DateTimeKind.Utc)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Remove to run test")]
|
||||
public void Another_date()
|
||||
{
|
||||
var date = Gigasecond.Date(new DateTime(1977, 6, 13, 0, 0, 0, DateTimeKind.Utc));
|
||||
Assert.That(date, Is.EqualTo(new DateTime(2009, 2, 19, 1, 46, 40, DateTimeKind.Utc)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Remove to run test")]
|
||||
public void Yet_another_date()
|
||||
{
|
||||
var date = Gigasecond.Date(new DateTime(1959, 7, 19, 0, 0, 0, DateTimeKind.Utc));
|
||||
Assert.That(date, Is.EqualTo(new DateTime(1991, 3, 27, 1, 46, 40, DateTimeKind.Utc)));
|
||||
}
|
||||
}
|
19
csharp/gigasecond/README.md
Normal file
19
csharp/gigasecond/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Gigasecond
|
||||
|
||||
Write a program that calculates the moment when someone has lived for 10^9 seconds.
|
||||
|
||||
A gigasecond is 10^9 (1,000,000,000) seconds.
|
||||
|
||||
### Submitting Exercises
|
||||
|
||||
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
|
||||
|
||||
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
|
||||
|
||||
## Source
|
||||
|
||||
Chapter 9 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=09](http://pine.fm/LearnToProgram/?Chapter=09)
|
||||
|
||||
## Submitting Incomplete Problems
|
||||
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
||||
|
Reference in New Issue
Block a user