public void ThisUpdate_InitialValue() { MainWindowViewModel vm = new MainWindowViewModel(); DateTime expected = DateTime.MinValue; DateTime actual = vm.ThisUpdate; Assert.AreEqual<DateTime>(expected, actual); }
public void Status_InitialValue() { MainWindowViewModel vm = new MainWindowViewModel(); string expected = string.Empty; string actual = vm.Status; Assert.AreEqual<string>(expected, actual); }
public void FormatDomainName() { MainWindowViewModel vm = new MainWindowViewModel(); Type t = vm.GetType(); MethodInfo m = t.GetMethod("FormatDomainName", BindingFlags.Instance | BindingFlags.NonPublic); string test = "google.com"; string expected = "zone \"google.com\" { type master; file \"/etc/bind/zones/db.poison\"; };"; string actual = (string)m.Invoke(vm, new object[] { (string)test }); Assert.AreEqual<string>(expected, actual); }
public void GetDomainName_withoutComment() { MainWindowViewModel vm = new MainWindowViewModel(); Type t = vm.GetType(); MethodInfo m = t.GetMethod("GetDomainName", BindingFlags.Instance | BindingFlags.NonPublic); string test = "0.0.0.0 google.com"; string expected = "google.com"; string actual = (string)m.Invoke(vm, new object[] { (string)test }); Assert.AreEqual<string>(expected, actual); }
public void Activity_InitialValue() { MainWindowViewModel vm = new MainWindowViewModel(); Assert.IsFalse(vm.Activity); }