using System.Collections.Generic;
using System.Threading.Tasks;
namespace Dearman_Technical_test
public Guid id { get; set; }
ORDER_STATUS status { get; set; }
public DateTime? dispatchedTime { get; set; }
public DateTime? confirmedTime { get; set; }
public DateTime? rejectedTime { get; set; }
public DateTime? arrivalTime { get; set; }
public DateTime? deliveryTime { get; set; }
public DateTime targetArrivalStart { get; set; }
public DateTime targetArrivalEnd { get; set; }
public DateTime targetDeliveryStart { get; set; }
public DateTime targetDeliveryEnd { get; set; }
public decimal baseRate { get; set; }
public DateTime? createdWhen { get; set; }
public string createdBy { get; set; }
public static void Main(string[] args)
public static void Test1()
string input = "Ellen*Ripley*1234 N. Weaver St*Los Angeles~Dwayne*Hicks*123 Biehn St.*Oakland~William*Hudson*17 Parade St.*Tucson";
string expectedOutput = "<1>" +
" <1-3>1234 N. Weaver St</1-3>" +
" <1-4>Los Angeles</1-4>" +
" <2-3>123 Biehn St.</2-3>" +
" <3-3>17 Parade St.</3-3>" +
string output = StringParser(input);
Assert.AreEqual(expectedOutput, output);
private static string StringParser(string input)
List<string> strList = new List<string>();
for (int i = 0; i < input.Length; i++)
" <1-1>"+strList[0]+"</1-1>" +
" <1-2>"+strList[1]+"</1-2>" +
" <1-3>"+strList[2]+"</1-3>" +
" <1-4>"+strList[3]+"</1-4>" +
" <2-1>"+strList[4]+"e</2-1>" +
" <2-2>"+strList[5]+"</2-2>" +
" <2-3>"+strList[6]+"</2-3>" +
" <2-4>"+strList[7]+"</2-4>" +
" <3-1>"+strList[8]+"</3-1>" +
" <3-2>"+strList[9]+"</3-2>" +
" <3-3>"+strList[10]+"</3-3>" +
" <3-4>"+strList[11]+"</3-4>" +
throw new NotImplementedException("Test 1 - StringParser method not implemented.");
public static void Test2()
Assert.AreEqual(20, Divisor(20, 3, 33));
Assert.AreEqual(111, Divisor(333, 3, 111));
Assert.AreEqual(42.645454545454548d, Divisor(234.55, 5.5, 171));
Assert.AreEqual(77, Divisor(1232, 4, 200));
private static double Divisor(double input, double denominator, double limit)
while(num != limit || num > limit)
num = input / denominator;
throw new NotImplementedException("Test 2 - Divisor method not implemented.");
public static void Test3()
Assert.AreEqual(20, DivisorRecursive(20, 3, 33));
Assert.AreEqual(111, DivisorRecursive(333, 3, 111));
Assert.AreEqual(42.645454545454548d, DivisorRecursive(234.55, 5.5, 171));
Assert.AreEqual(77, DivisorRecursive(1232, 4, 200));
private static double DivisorRecursive(double input, double denominator, double limit)
num = input /denominator;
return DivisorRecursive(num, denominator, limit);
throw new NotImplementedException("Test 3 - DivisorRecursive method not implemented.");
public static void Test4()
Dictionary<int, string> dict_vals = new Dictionary<int, string>();
throw new NotImplementedException("Test 4 - method not implemented.");
public static void Test5()
throw new NotImplementedException("Test 5 - method not implemented.");
public static void Test6()
throw new NotImplementedException("Test 6 - method not implemented.");
public static void Test7()
throw new NotImplementedException("Test 7 - method not implemented.");