Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Shouldn't you remove those entirely? Which classes/methods do you want to use?
/Q
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>(); ////fakeEpiBaseLibraryContext //// .Setup(fake => fake.RequestTime) //// .Returns(DateTime.Now); ////var fakeBaseFactory = new Mock<IBaseLibraryFactory>(); ////fakeBaseFactory //// .Setup(factory => factory.CreateContext()) //// .Returns(fakeEpiBaseLibraryContext.Object); ////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!
https://github.com/DavidVujic/EPiServer-FakeMaker/
/David
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); EPiServer.BaseLibrary.ClassFactory.RegisterClass(typeof(EPiServer.BaseLibrary.IRuntimeCache), typeof(EPiServer.Implementation.DefaultRuntimeCache));
How would I convert this to something that works with 9.0.3?