/// <summary> /// Compares and contrasts the difference between XrmUnitTest, and using a Faking Framework, such as MsFakes /// </summary> private void AdvantageOfXrmUnitTestVsMsFakes() { // Logic class (not a plugin) to Test // Updates the First or Last Name of contacts to match the given casing RenameLogic.MakeNameMatchCase(null, null); // Testing class for testing the logic var tests = new MsFakesVsXrmUnitTestExampleTests(); }
public void MakeNameMatchCase_NameIsMcdonald_Should_UpdateToMcDonald() { // // Arrange // var service = LocalCrmDatabaseOrganizationService.CreateOrganizationService <CrmContext>(); var id = service.Create(new Contact { LastName = "Mcdonald" }); // // Act // RenameLogic.MakeNameMatchCase(service, "McDonald"); // // Assert // Assert.AreEqual("McDonald", service.GetEntity <Contact>(id).LastName); }