I'm looking at a Unit Test project where some things were setup with these lines.
EPiServer.BaseLibrary.ClassFactory.Instance = new EPiServer.DefaultBaseLibraryFactory(string.Empty);
How would I convert this to something that works with 9.0.3?
Shouldn't you remove those entirely? Which classes/methods do you want to use?
At first I thought the error was due to commenting those lines out and not replacing them with anything.But I soon found it was an issue with DataLibrary in the FakeMaker library referenced.I cloned the source from https://github.com/DavidVujic/EPiServer-FakeMaker/ and commented out these lines and nuget-updated EPi in there as well.
////var fakeEpiBaseLibraryContext = new Mock<IContext>();
//// .Setup(fake => fake.RequestTime)
////var fakeBaseFactory = new Mock<IBaseLibraryFactory>();
//// .Setup(factory => factory.CreateContext())
////ClassFactory.Instance = fakeBaseFactory.Object;
Now my tests are succeeding again.
FakeMaker is now updated with EPi 9 binaries and the rows that caused the build failure (EPi 9 breaking changes) are now removed from the code. Please let me know if you run into any issues!