public void Should_head_north_given_character_n() { const char direction = 'n'; var result = Compass.Get(direction); Assert.AreEqual(result, Compass.north); Assert.AreEqual(result.left_direction, 'w'); Assert.AreEqual(result.right_direction, 'e'); }
public void should_head_south_given_character_w() { const char direction = 'w'; var result = Compass.Get(direction); Assert.AreEqual(result, Compass.west); Assert.AreEqual(result.left_direction, 's'); Assert.AreEqual(result.right_direction, 'n'); }
/// <summary> /// </summary> /// <param name="value"></param> /// <returns></returns> public static string ShortCompass(int value) { return($"{Compass.Get(value).Symbol} ({Degrees(value)})"); }
/// <summary> /// </summary> /// <param name="value"></param> /// <returns></returns> public static string LongCompass(int value) { return($"{Compass.Get(value).Name} ({Degrees(value)})"); }