public void StumpNameExists_WithExistantName_ReturnsTrue() { var contract = new StumpContract() { OriginalRequest = new RecordedRequest(Substitute.For<IStumpsHttpRequest>(), ContentDecoderHandling.DecodeNotRequired), OriginalResponse = new RecordedResponse(Substitute.For<IStumpsHttpResponse>(), ContentDecoderHandling.DecodeNotRequired), Response = new RecordedResponse(Substitute.For<IStumpsHttpResponse>(), ContentDecoderHandling.DecodeNotRequired), StumpCategory = "ABC", StumpId = "abc", StumpName = "StumpName" }; var instance = new StumpsServerInstance(Substitute.For<IServerFactory>(), _serverId, _dal); instance.CreateStump(contract); Assert.IsTrue(instance.StumpNameExists(contract.StumpName)); }
public void StumpNameExists_WithExistantName_ReturnsTrue() { var contract = new StumpContract() { OriginalRequest = new RecordedRequest(Substitute.For <IStumpsHttpRequest>(), ContentDecoderHandling.DecodeNotRequired), OriginalResponse = new RecordedResponse(Substitute.For <IStumpsHttpResponse>(), ContentDecoderHandling.DecodeNotRequired), Response = new RecordedResponse(Substitute.For <IStumpsHttpResponse>(), ContentDecoderHandling.DecodeNotRequired), StumpCategory = "ABC", StumpId = "abc", StumpName = "StumpName" }; var instance = new StumpsServerInstance(Substitute.For <IServerFactory>(), _serverId, _dal); instance.CreateStump(contract); Assert.IsTrue(instance.StumpNameExists(contract.StumpName)); }