public void ClassPart_WillReturnClassPartOfClassName_IfClassContainedInNamespace() { var vm = new GuiTypeViewModel() { NamespaceDotType = "nsp.cls" }; string classPart = vm.Class; Assert.AreEqual("cls", classPart); }
public void NamespacePart_DependsOnChangesOfNamespaceDotType_Always() { var vm = new GuiTypeViewModel() { NamespaceDotType = "nsp.cls" }; var notifiedProps = new List<string>(); vm.PropertyChanged += (sender, args) => notifiedProps.Add(args.PropertyName); vm.NamespaceDotType = "nsp2.cls2"; Assert.IsTrue(notifiedProps.Contains("Namespace")); }
public void NamespacePart_WillReturnEmptyString_IfClassNotContainedInAnyNamespace() { var vm = new GuiTypeViewModel() { NamespaceDotType = "classname" }; string namespacePart = vm.Namespace; Assert.AreEqual("", namespacePart); }
public void NamespacePart_WillReturnNamespacePartOfClassName_IfClassContainedInNamespace() { var vm = new GuiTypeViewModel() { NamespaceDotType = "nsp.cls" }; string namespacePart = vm.Namespace; Assert.AreEqual("nsp", namespacePart); }