public void Test_swe_cs2timestr() { using (var target = new SwissEph()) { Assert.Equal("00-00-00", target.swe_cs2timestr(0, '-', false)); Assert.Equal("00-00", target.swe_cs2timestr(0, '-', true)); Assert.Equal("00:00:00", target.swe_cs2timestr(0, ':', false)); Assert.Equal("00:00", target.swe_cs2timestr(0, ':', true)); Assert.Equal("03:25:46", target.swe_cs2timestr(1234567, ':', false)); Assert.Equal("03:25:46", target.swe_cs2timestr(1234567, ':', true)); Assert.Equal("0-:.+:,+", target.swe_cs2timestr(-1234567, ':', false)); Assert.Equal("0-:.+:,+", target.swe_cs2timestr(-1234567, ':', true)); } }
public void Test_swe_cs2timestr() { using (var target = new SwissEph()) { Assert.AreEqual("00-00-00", target.swe_cs2timestr(0, '-', false)); Assert.AreEqual("00-00", target.swe_cs2timestr(0, '-', true)); Assert.AreEqual("00:00:00", target.swe_cs2timestr(0, ':', false)); Assert.AreEqual("00:00", target.swe_cs2timestr(0, ':', true)); Assert.AreEqual("03:25:46", target.swe_cs2timestr(1234567, ':', false)); Assert.AreEqual("03:25:46", target.swe_cs2timestr(1234567, ':', true)); Assert.AreEqual("0-:.+:,+", target.swe_cs2timestr(-1234567, ':', false)); Assert.AreEqual("0-:.+:,+", target.swe_cs2timestr(-1234567, ':', true)); } }